diff options
Diffstat (limited to 'test/ruby/test_range.rb')
-rw-r--r-- | test/ruby/test_range.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 9052fe6174..0b3f6c68f6 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -127,6 +127,10 @@ class TestRange < Test::Unit::TestCase assert_raise(RangeError) { (1...).max(3) } assert_raise(RangeError) { (..0).min {|a, b| a <=> b } } + + assert_equal(2, (..2).max) + assert_raise(TypeError) { (...2).max } + assert_raise(TypeError) { (...2.0).max } end def test_minmax |