Actions
Bug #18577
closedRange#include? returns wrong result for beginless range with exclusive string end
Bug #18577:
Range#include? returns wrong result for beginless range with exclusive string end
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-linux]
Description
Exclusive range should not include the end value, but (...'z').include? 'z' returns true. member? and === behave in the same way, while cover? does not.
This happens when the range is beginless and its end is string.
Actions