summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-22 13:37:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-22 13:37:16 +0000
commit91fcdd186568931bd3ab36419ced4bf25b7fb27c (patch)
tree5f4bb56de6d420b31a00199dafb95e34b141aed6
parent48fc312150b6ad1ff4219dd11da2cb0cae91aefe (diff)
[Bug #6540]
* test/ruby/test_rand.rb (TestRand#test_initialize_frozen): add missing test for [Bug #6540] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_rand.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb
index a722c67..0b60162 100644
--- a/test/ruby/test_rand.rb
+++ b/test/ruby/test_rand.rb
@@ -485,6 +485,14 @@ END
}
end
+ def test_initialize_frozen
+ r = Random.new(0)
+ r.freeze
+ assert_raise(RuntimeError, '[Bug #6540]') do
+ r.__send__(:initialize, r)
+ end
+ end
+
def test_marshal_load_frozen
r = Random.new(0)
d = r.marshal_dump