Skip to content

Ruby 2.6: Add support for endless range in more methods#5552

Merged
enebo merged 4 commits intojruby:ruby-2.6from
nomadium:ruby-2.6-add-support-for-endless-range-in-more-methods
Jan 10, 2019
Merged

Ruby 2.6: Add support for endless range in more methods#5552
enebo merged 4 commits intojruby:ruby-2.6from
nomadium:ruby-2.6-add-support-for-endless-range-in-more-methods

Conversation

@nomadium
Copy link
Contributor

@nomadium nomadium commented Jan 9, 2019

Hi folks,

This PR iterates on the changes introduced on #5540.

Summary:

  • Make Range#min, max, include?, cover?, and === to support endless range

  • Range#to_a now raises RangeError if it is endless

  • Range#size now returns Float::INFINITY if it is endless

  • Range#last and #max raises a RangeError if it is endless

For more information, please see feature #12912. [1]

For reference, I include links to similar commits in MRI: [2] [3] [4] [5].

Thanks for the feedback.

  1. https://bugs.ruby-lang.org/issues/12912
  2. ruby/ruby@db1bdec
  3. ruby/ruby@c19ecf0
  4. ruby/ruby@3426193
  5. ruby/ruby@cae4517

For more information, please see feature #12912.
For more information, please see feature #12912.
For more information, please see feature #12912.
For more information, please see feature #12912.
@enebo enebo added this to the JRuby 9.3.0.0 milestone Jan 10, 2019
@enebo enebo merged commit c68fea3 into jruby:ruby-2.6 Jan 10, 2019
@enebo
Copy link
Member

enebo commented Jan 10, 2019

@nomadium hey fixed the :fast problem with spec runs...should be a new batch of errors!

@nomadium
Copy link
Contributor Author

@enebo Excellent, thanks for fixing it! I was a little puzzled because the error message is not evident at all (at least for me).

@nomadium nomadium deleted the ruby-2.6-add-support-for-endless-range-in-more-methods branch January 10, 2019 18:07
@enebo
Copy link
Member

enebo commented Jan 10, 2019

@nomadium once I looked at the error message and the fact we have the same exact string on master I realized our spec config file had the ruby version in the name....seems somewhat unneeded in how we test now but in the past we would test multiple ruby versions in same release.

@kares kares added the ruby 2.6 label Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants