We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Range#overlaps?
(1..5).overlaps?(..10) (..5).overlaps?(..10)
It returns true
true
It raises a RangeError: cannot get the first element of beginless range
RangeError: cannot get the first element of beginless range
Rails version: 7
Ruby version: 3.0.2
The text was updated successfully, but these errors were encountered:
Thanks for the report, do you want to try and make a PR with a fix? It would be in here https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/range/overlaps.rb and tests here https://github.com/rails/rails/blob/main/activesupport/test/core_ext/range_ext_test.rb#L52
Sorry, something went wrong.
Sure!
Fixed by #44757.
Successfully merging a pull request may close this issue.
Steps to reproduce
Expected behavior
It returns
true
Actual behavior
It raises a
RangeError: cannot get the first element of beginless range
System configuration
Rails version: 7
Ruby version: 3.0.2
The text was updated successfully, but these errors were encountered: