summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_range.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index cc9e67053c..58c853fe60 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -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