From 4d73f950682736914ae1a1935b0d224ffeb5ba9c Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 3 Dec 2012 10:10:14 +0000 Subject: random.c, rational.c: make marshal methods private * random.c (Init_Random), rational.c (Init_Rational): make marshal methods private. [Feature #6539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rand.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index fe88305788..b482773c00 100644 --- a/test/ruby/test_rand.rb +++ b/test/ruby/test_rand.rb @@ -482,7 +482,7 @@ END def test_marshal bug3656 = '[ruby-core:31622]' assert_raise(TypeError, bug3656) { - Random.new.marshal_load(0) + Random.new.__send__(:marshal_load, 0) } end @@ -496,19 +496,19 @@ END def test_marshal_load_frozen r = Random.new(0) - d = r.marshal_dump + d = r.__send__(:marshal_dump) r.freeze assert_raise(RuntimeError, '[Bug #6540]') do - r.marshal_load(d) + r.__send__(:marshal_load, d) end end def test_marshal_load_insecure r = Random.new(0) - d = r.marshal_dump + d = r.__send__(:marshal_dump) l = proc do $SAFE = 4 - r.marshal_load(d) + r.__send__(:marshal_load, d) end assert_raise(SecurityError, '[Bug #6540]') do l.call -- cgit v1.2.3