ArgumentError using to_time string conversion
---------------------------------------------

                 Key: JRUBY-1414
                 URL: http://jira.codehaus.org/browse/JRUBY-1414
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.1
         Environment: Darwin dhcp-umpk16-87-31.sfbay.sun.com 8.10.3 Darwin 
Kernel Version 8.10.3: Wed Jun 27 23:29:36 PDT 2007; 
root:xnu-792.23.3~1/RELEASE_I386 i386 i386
            Reporter: Nathan Fiedler


With Java 1.5.0_07 (the one included with this version of OS X) and a local 
build of jruby-1_0 branch, I am seeing the following behavior when using Rails 
to_time method to convert a String to a Time.

$ jruby script/console 
Loading development environment.
>> s = 'Wed, 10 Oct 2007 11:55:23 -0700'
>> => "Wed, 10 Oct 2007 11:55:23 -0700"
s.to_time
>> ArgumentError: Argument out of range.
        from 
/Users/nf151384/heliopolis/trunk/scm/script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/string/conversions.rb:10:in
 `to_time'
        from (irb):2:in `binding'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:150:in `eval_input'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in `signal_status'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:147:in `eval_input'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in 
`each_top_level_statement'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `loop'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `catch'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `eval_input'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in `start'
        from :1:in `catch'
        from /usr/local/jruby-1.0.1/lib/ruby/1.8/irb.rb:69:in `start'
        from :1

Also note the input prompts are printing out of sequence with the command 
output, which is a separate issue.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to