From 2b6528582beec616f0bb4a9a38101e163009e7b7 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 22 Oct 2001 06:48:18 +0000 Subject: * class.c (rb_mod_clone): should not copy class name, since clone should remain anonymous. * eval.c (rb_call0): self in a block given to define_method now be switched to the receiver of the method. * eval.c (proc_invoke): added new parameter to allow self switching. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sample') diff --git a/sample/test.rb b/sample/test.rb index 6c352fa08..104ff2900 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1192,6 +1192,9 @@ $x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)] $y = Marshal.dump($x) test_ok($x == Marshal.load($y)) +StrClone=String.clone; +test_ok(Marshal.load(Marshal.dump(StrClone.new("abc"))).type == StrClone) + test_check "pack" $format = "c2x5CCxsdils_l_a6"; -- cgit