summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-26 00:49:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-26 00:49:54 +0000
commit7e4015e16d3d3c5780440a9d15af4bcae8d4e4e1 (patch)
tree7455d5ee23e1fe42ed65f0342225b2d360d130b1 /test
parent3dc6edf793c33483c9d7365b865152d57fa994fb (diff)
* array.c (rb_ary_shuffle_bang): check number of argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_array.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 4a8b700c77..4c3aba0589 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -1893,6 +1893,7 @@ class TestArray < Test::Unit::TestCase
end
gen = Random.new(0)
+ assert_raise(ArgumentError) {[1, 2, 3].shuffle(1, random: gen)}
srand(0)
100.times do
assert_equal([0, 1, 2].shuffle, [0, 1, 2].shuffle(random: gen))