Make beginless Range#size return nil if it ends with non-numeric
This commit is contained in:
parent
4259d5b5ae
commit
3ef7b632a0
@ -992,6 +992,7 @@ class TestRange < Test::Unit::TestCase
|
||||
assert_equal Float::INFINITY, (...1).size
|
||||
assert_equal Float::INFINITY, (...1.0).size
|
||||
assert_nil ("a"...).size
|
||||
assert_nil (..."z").size
|
||||
end
|
||||
|
||||
def test_bsearch_typechecks_return_values
|
||||
|
Loading…
x
Reference in New Issue
Block a user