From 91fcdd186568931bd3ab36419ced4bf25b7fb27c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 22 Jun 2012 13:37:16 +0000 Subject: [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 --- test/ruby/test_rand.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index a722c67f4a..0b601628f6 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 -- cgit v1.2.3