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

Fix bug in Range comparisons when comparing to excluded-end Range #35776

Merged
merged 1 commit into from Mar 28, 2019
Merged

Fix bug in Range comparisons when comparing to excluded-end Range #35776

merged 1 commit into from Mar 28, 2019

Conversation

@owst
Copy link
Contributor

@owst owst commented Mar 28, 2019

Summary

I noticed that the addition of support for Range arguments to #cover? and friends in #32938 didn't correctly handle exclude-end arguments:

Before:

(1..10).cover?(1...11) => false

After:

(1..10).cover?(1...11) => true

Other Information

See https://git.io/fjTtz for the commit against Ruby core that added
support for Range arguments, with similar handling of this case.

Before:
```ruby
(1..10).cover?(1...11) => false
```

After:
```ruby
(1..10).cover?(1...11) => true
```

See https://git.io/fjTtz for the commit against Ruby core that added
support for Range arguments, with similar handling of this case.
@rafaelfranca rafaelfranca merged commit a7723b8 into rails:master Mar 28, 2019
3 checks passed
3 checks passed
buildkite/rails Build #59918 passed (17 minutes, 45 seconds)
Details
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants