aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_array.rb')
-rw-r--r--test/ruby/test_array.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 9b3dfdf45f..a20c6b23cd 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1605,6 +1605,8 @@ class TestArray < Test::Unit::TestCase
end
assert_operator(h.values.min * 2, :>=, h.values.max) if n != 0
end
+
+ assert_raise(ArgumentError, '[ruby-core:23374]') {[1, 2].sample(-1)}
end
def test_cycle