Added test case to reproduce issue #1311.
Making the test pass
using an inline if
FIxing bad indentation
Adding comment to explain how the Date works in Java (Using JODA Time…
… lib) and how it should work in Ruby to keep the mri compatiblity
Added more tests cases to fully cover all the expected behavior on
Comparing two DateTimes (and sub milliseconds) using <=> and returnin…
…g -1, 0, or +1 depending
on whether the receiver is less than, equal to, or greater than the
@Sinjo done! Thanks!
@lucasallan Awesome, cool to see it fixed. Probably worth making sure these commits get applied (haven't looked if they just apply cleanly, suspect they may not due to path changes) on the jruby-1_7 branch so they go into the next 1.7.x patch release. :-)
@Sinjo Sounds great. Thanks :D
If this should go into 1.7, it might be better to reapply the fixes to 1.7, since we merge from there to master.
We can also merge this and then do a second PR for the 1.7 branch, but it makes the merge logs a little weird.
Actually, I managed to cherry-pick all commits just fine, and will run some local tests. If all is well, I'll push, merge to master, and call this one done.
Thanks @headius :D
Cherry-picked to jruby-1_7 up to b11ad9a and merged to master at 11ee84b.
I also fixed the misspelling in the test name and will commit that to MRI trunk.
@headius Sorry about it, english isn't my native language.
No problem :-)