You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, thanks for the report, @aardvark179 could you take a look?
It sounds like Rational() is not strict with strings for some reason (looks like we're using to_r for Strings which is not strict, seems that code comes from Rubinius).
We end up delegating Rational('') to Rational.convert('', 1), which then falls ''.to_r. That all seems entirely sensible, but ''.to_r does return 0/1 on both MRI and TruffleRuby.
I love it when two different routes to creating something return different results. :-)
In MRI (2.7.5 and 3.1.0 tested):
In TruffleRuby 21.3.0:
It seems that the same applies to any non-numeric string.
The text was updated successfully, but these errors were encountered: