summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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