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

Latest 1.7.5 snapshot breaks DateTime + method #1072

Closed
bensummers opened this Issue Oct 2, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@bensummers
Copy link

bensummers commented Oct 2, 2013

Using the 1.7.5 snapshot from 02-Oct-2013 05:05, adding a Rational to a DateTime breaks.

$ jruby -v test/range_error_test.rb 
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) Server VM 1.7.0_40-b43 +indy [SunOS-x86]
#<DateTime: 2012-01-01T00:00:00+00:00 (4911855/2,0,2299161)>

$ jruby -v test/range_error_test.rb 
jruby 1.7.5 (1.9.3p392) 2013-10-01 e3b1080 on Java HotSpot(TM) Server VM 1.7.0_40-b43 [SunOS-x86]
RangeError: too big for int: 31536000000
       + at /opt/oneis/platform/jruby/lib/ruby/1.9/date.rb:1363
  (root) at test/range_error_test.rb:3

Test script:

require 'date'
date = DateTime.new(2011,1,1)
p date + Rational(365,1)

@ghost ghost assigned eregon Oct 2, 2013

@headius headius closed this in 7b602af Oct 3, 2013

@bensummers

This comment has been minimized.

Copy link
Author

bensummers commented Oct 4, 2013

I'm using a snapshot from 04-Oct-2013 13:05 (obtained from http://ci.jruby.org/snapshots/1.7.x/ ) which I think should include this fix, but looking at date.rb, I can see it's not there.

Am I getting my snapshots from the right place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.