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

Ruby 2.6: Switch Range#=== to use cover? instead of include? #5555

Conversation

nomadium
Copy link
Contributor

Hi folks,

This PR implements another Ruby 2.6 feature: Switch Range#=== to use cover? instead of include?

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

All its related tests are passing. [2] [3]

For reference, I include a link to the commit introducing the functionality in MRI. [4]

Thanks in advance for any feedback.

  1. https://bugs.ruby-lang.org/issues/14575
  2. https://github.com/ruby/ruby/blob/v2_6_0/test/ruby/test_range.rb#L505-L513
  3. https://github.com/ruby/spec/blob/7fa95f66e355c2f122c5edd79e4c5e8f5e42c8f0/core/range/case_compare_spec.rb#L14-L19
  4. ruby/ruby@989e07c

For more information, please see feature #14575.
@enebo enebo added this to the JRuby 9.3.0.0 milestone Jan 11, 2019
@enebo enebo merged commit 10bf839 into jruby:ruby-2.6 Jan 11, 2019
@nomadium nomadium deleted the ruby-2.6-range-eqq-now-uses-cover-instead-of-include branch January 12, 2019 19:37
@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