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:
parent
cae4517419
commit
0ad9c00525
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue