diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-26 13:39:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-26 13:39:15 +0000 |
commit | 3d0786a3a80932e99a63497597770fbb94401653 (patch) | |
tree | b1e38be2f0a4004a41c37c912da41a4b61ad718d /marshal.c | |
parent | 68d131d6a50898dc605a739caa76b494b65c6393 (diff) |
marshal.c: marshal_dump instance varialbes
* marshal.c (w_object): dump instance varialbes of the result of
marshal_dump not the original object. [ruby-core:51163] [Bug #7627]
* complex.c (nucomp_marshal_dump): need to copy instance variables.
* rational.c (nurat_marshal_dump): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -651,11 +651,11 @@ w_object(VALUE obj, struct dump_arg *arg, int limit) v = rb_funcall2(obj, s_mdump, 0, 0); check_dump_arg(arg, s_mdump); - hasiv = has_ivars(obj, ivtbl); + hasiv = has_ivars(v, ivtbl); if (hasiv) w_byte(TYPE_IVAR, arg); w_class(TYPE_USRMARSHAL, obj, arg, FALSE); w_object(v, arg, limit); - if (hasiv) w_ivar(obj, ivtbl, &c_arg); + if (hasiv) w_ivar(v, ivtbl, &c_arg); return; } if (rb_obj_respond_to(obj, s_dump, TRUE)) { |