1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/ruby/test_range.rb: add a test for endless range's min with comparison

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-06-22 03:07:24 +00:00
parent cae4517419
commit 0ad9c00525

View file

@ -93,6 +93,8 @@ class TestRange < Test::Unit::TestCase
assert_equal([0,1,2], (0..10).min(3))
assert_equal([0,1], (0..1).min(3))
assert_equal([0,1,2], (0..).min(3))
assert_raise(RangeError) { (0..).min {|a, b| a <=> b } }
end
def test_max