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

Date#next_year difference behvior with MRI #2867

Closed
gazay opened this Issue Apr 22, 2015 · 7 comments

Comments

Projects
None yet
6 participants
@gazay
Copy link
Contributor

commented Apr 22, 2015

bug from AS rails tests

Seems to related to #1769

# jruby master
irb(main):002:0> require 'date'
=> true
irb(main):003:0> Date.new(1581,10,10).next_year
=> #<Date: 1582-10-20 ((2299166j,0s,0n),+0s,2299161j)>

# ruby 2.2.2
irb(main):002:0> require 'date'
=> true
irb(main):003:0> Date.new(1581,10,10).next_year
=> #<Date: 1582-10-04 ((2299160j,0s,0n),+0s,2299161j)>

@headius headius added this to the 9.0.0.0.rc1 milestone Apr 22, 2015

@headius

This comment has been minimized.

Copy link
Member

commented Apr 22, 2015

This could be simple so I'm marking for beginners.

@headius headius added the Rails label Apr 22, 2015

@raeoks

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2015

It seems like a good bug to get started.
@eregon had already posted a solution at #1769, but he also mentioned that it's likely to be fairly slow.
@headius Let me know if you have something like that in your mind.

raeoks pushed a commit to raeoks/jruby that referenced this issue Jun 29, 2015

Ranjeet Singh
[jruby#2867] modified Date#>> to take calendar reforms under consider…
…ation

- added tests for next month with calendar reform
- uses solution provided in jruby#1769 comments
- also fixes issues jruby#1769

@kares kares added the JRuby 1.7.x label Jun 30, 2015

@headius

This comment has been minimized.

Copy link
Member

commented Jul 2, 2015

I'm not concerned about the performance if we can get a fix in for this for JRuby 9k RC2. @eregon or @raeoks, can you make a PR so we can wrap this up?

@eregon

This comment has been minimized.

Copy link
Member

commented Jul 3, 2015

I'll let @raeoks take care of it since he already worked on adding tests/specs.

raeoks pushed a commit to raeoks/jruby that referenced this issue Jul 8, 2015

@enebo enebo modified the milestones: JRuby 9.0.0.0.rc2, JRuby 9.0.0.0 Jul 9, 2015

eregon added a commit that referenced this issue Jul 21, 2015

[#2867] modified Date#>> to take calendar reforms under consideration
- added tests for next month with calendar reform
- uses solution provided in #1769 comments
- also fixes issues #1769

eregon added a commit to eregon/jruby that referenced this issue Jul 21, 2015

[jruby#2867] modified Date#>> to take calendar reforms under consider…
…ation

- added tests for next month with calendar reform
- uses solution provided in jruby#1769 comments
- also fixes issues jruby#1769

eregon added a commit to eregon/jruby that referenced this issue Jul 21, 2015

@kares kares added this to the JRuby 1.7.22 milestone Jul 21, 2015

@eregon

This comment has been minimized.

Copy link
Member

commented Jul 23, 2015

Fixed by #3157 and #3091.

@eregon eregon closed this Jul 23, 2015

@eregon

This comment has been minimized.

Copy link
Member

commented Jul 23, 2015

Thanks @raeoks for your contribution and the specs!

@raeoks

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2015

@eregon It's been a pleasure to work on JRuby. Next I'll move on to another beginner bug.

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.