summaryrefslogtreecommitdiff
path: root/yjit/src/cruby.rs
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2022-04-21 19:46:17 -0700
committerJeremy Evans <code@jeremyevans.net>2022-06-06 09:59:22 -0700
commitc5475f42694eff35465c3332e0182c0611ca5918 (patch)
tree580a6b99eac40d94b8b6c528f70d11aff9e9dbff /yjit/src/cruby.rs
parent7cda7fbbdc14f4262afaa94cdeb5a5987f1eb01a (diff)
Fix Range#cover? returning true for beginless ranges of different types
Previously `(2..).cover?("2"..)` was false, but `(..2).cover?(.."2")` was true. This changes it so both are false, treating beginless ranges the same as endless ranges in regards to type checks. This also adds documentation to #cover? to describe behavior with beginless and endless ranges, testing each documentation example, which is how this bug was found. Fixes [Bug #18155]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5831
Diffstat (limited to 'yjit/src/cruby.rs')
0 files changed, 0 insertions, 0 deletions