forked from jruby/jruby
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gets Numeric#step.size doing its thing by putting the following pieces in place: * implement Numeric#intervalStepSize closely following the MRI implementation (https://github.com/ruby/ruby/blob/09b02349c212cac6395e9a634e3d4610e9bbc48c/numeric.c#L1799) * implement Numeric#floatStepSize which Numeric#intervalStepSize relies on, again porting from MRI (https://github.com/ruby/ruby/blob/09b02349c212cac6395e9a634e3d4610e9bbc48c/numeric.c#L1748)) * refactor Numeric#floatStep19 to also use the new floatStepSize, which not only avoids duplication, but also fixes some tests * create Numeric#stepSize, and use it to enumeratorizeWithSize our steps We'll be able to un-exclude test_size_for_step from test_enumerator.rb once Range#size is implemented (jruby#1252).
- Loading branch information
Showing
2 changed files
with
104 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters