aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_rand.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-03 10:10:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-03 10:10:14 +0000
commit4d73f950682736914ae1a1935b0d224ffeb5ba9c (patch)
tree3b794d815771aef275512248cb47879f232237b2 /test/ruby/test_rand.rb
parentc4f9dd26263da640a2c9a02c478df245685e2b69 (diff)
downloadruby-4d73f950682736914ae1a1935b0d224ffeb5ba9c.tar.gz
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
Diffstat (limited to 'test/ruby/test_rand.rb')
-rw-r--r--test/ruby/test_rand.rb10
1 files changed, 5 insertions, 5 deletions
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