summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-21 14:47:02 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-21 14:47:02 +0000
commit5453b6d4a7423e4c4b949bc27da03e6667f80293 (patch)
tree7efc61d39580d58bb23212e5ba3a28e27b92a34a /test
parent1662bee468d632e341c48e90479d2ffe68f0fb2c (diff)
merges r23359 from trunk into ruby_1_9_1.
-- * array.c (rb_ary_sample): negative sample number is invalid. [ruby-core:23374] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 36abe09963..384ce239f9 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1588,6 +1588,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