Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime.iso8601 fails with an error (incompatibility) #2883

Closed
kares opened this issue Apr 28, 2015 · 1 comment
Closed

DateTime.iso8601 fails with an error (incompatibility) #2883

kares opened this issue Apr 28, 2015 · 1 comment

Comments

@kares
Copy link
Member

kares commented Apr 28, 2015

jruby-1.7.19 :004 > require 'date'
 => true 
jruby-1.7.19 :005 > DateTime.parse '2014-07-08T17:51:36.000Z'
 => #<DateTime: 2014-07-08T17:51:36+00:00 ((2456847j,64296s,0n),+0s,2299161j)> 
jruby-1.7.19 :006 > puts DateTime.parse '2014-07-08T17:51:36.000Z'
2014-07-08T17:51:36+00:00
 => nil 
jruby-1.7.19 :007 > DateTime.iso8601('2014-07-08T17:51:36.000Z')
NoMethodError: undefined method `/' for "000":String
    from /opt/local/rvm/rubies/jruby-1.7.19/lib/ruby/1.9/date.rb:1778:in `new_by_frags'
    from /opt/local/rvm/rubies/jruby-1.7.19/lib/ruby/1.9/date.rb:1829:in `iso8601'
    from (irb):7:in `evaluate'
    from org/jruby/RubyKernel.java:1107:in `eval'
    from org/jruby/RubyKernel.java:1507:in `loop'
    from org/jruby/RubyKernel.java:1270:in `catch'
    from org/jruby/RubyKernel.java:1270:in `catch'
    from /opt/local/rvm/rubies/jruby-1.7.19/bin/irb:13:in `(root)'

expected :

1.9.3-p551 :001 > require 'date'
 => true 
1.9.3-p551 :002 > DateTime.iso8601('2014-07-08T17:51:36.000Z')
 => #<DateTime: 2014-07-08T17:51:36+00:00 ((2456847j,64296s,0n),+0s,2299161j)> 
1.9.3-p551 :003 > puts DateTime.iso8601('2014-07-08T17:51:36.000Z')
2014-07-08T17:51:36+00:00
 => nil 

taken from: http://stackoverflow.com/questions/29786162/datetime-iso86012014-07-08t175136-000z-results-in-nomethoderror

@kares
Copy link
Member Author

kares commented May 22, 2015

closed by #2941 ... thanks to @azolotko

@kares kares closed this as completed May 22, 2015
@kares kares added this to the JRuby 1.7.21 milestone May 22, 2015
kares added a commit that referenced this issue Jan 29, 2016
…th stdlib update)

... this resolves the last spec:regression (GH-2883)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant