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

Numeric#step issues #2892

Closed
fmfdias opened this issue Apr 29, 2015 · 0 comments

Comments

@fmfdias
Copy link

commented Apr 29, 2015

Hi everyone,

I've been adding keyword arguments support for the Numeric#step on Rubinius and today I decided to run those specs against jruby 9.0.0.0-pre2. Here's a list of issues I've found on jruby:

  • When calling step with the only float value being used is Float::INFINITY, the results being returned are Fixnums instead of Float
  • When calling step with self and stop as Floats and step as a string, it's raising TypeError instead of ArgumentError. It's trying to convert a float to string. The correct exception is raised when self and stop are Fixnums).
  • When calling step without a block, with self and stop as Floats and step is an numeric string, when calling size on the returned enumerator, a value is returned instead of raising an ArgumentError.
  • When calling step without a block, with self and stop as Floats and step is an alphanumeric string, when calling size on the returned enumerator, Float::INFINITY is returned instead of raising an ArgumentError.
  • When using keyword arguments, and by is 0.0, the values being returned are Fixnums instead of Floats.
  • When calling step with mixed positional and keyword arguments, it ignores the stop, which means it does an infinite loop.

Hope this can help you guys fix it. If you like to check or run these tests check them here: rubinius/rubinius#3356.

Thank you!

@headius headius added this to the JRuby 9.2.8.0 milestone Apr 12, 2019

@headius headius closed this in b5805ea Apr 12, 2019

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