Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for Floats as the first argument in Time.at. #609
While investigating #565, I noticed that JRuby converts a
This commit fixes that, plus keeps track of nanoseconds overflowing to the next millisecond, which is possible when the first argument is not a
I squashed the the commits and rebased against master.
Rubyspec covers this, more or less, but it expects Floats to be converted using
I have a version that does the conversion with
I'm testing your non-to_r version right now. Unfortunately to_r may be intentional behavior, whether it is documented or not. This is definitely a grey area for the Ruby spec.
I would suggest you modify that patch to be based on this one, and we can merge this in so that the majority of cases that don't use to_r will start working. Then, you should file an issue asking for clarification of whether the to_r behavior is intentional and part of the specification or not.