From 1d10aa8bfc98a42522716f71aae60cb70498a6e6 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 7 Dec 2009 05:11:10 +0000 Subject: * marshal.c (w_object): reverted r26007. [ruby-dev:39845] * test/test_delegate.rb (test_marshal): moved from test_marshal.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- marshal.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'marshal.c') diff --git a/marshal.c b/marshal.c index 129ea701c8..549a6f6c0c 100644 --- a/marshal.c +++ b/marshal.c @@ -643,23 +643,14 @@ w_object(VALUE obj, struct dump_arg *arg, int limit) if (rb_respond_to(obj, s_mdump)) { volatile VALUE v; - int hasiv2 = 0; st_add_direct(arg->data, obj, arg->data->num_entries); v = rb_funcall(obj, s_mdump, 0, 0); check_dump_arg(arg, s_mdump); - if (!hasiv && (hasiv2 = rb_ivar_count(obj) > 0)) { - 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); - } - else if (hasiv2) { - w_objivar(obj, &c_arg); - } + if (hasiv) w_ivar(obj, ivtbl, &c_arg); return; } if (rb_respond_to(obj, s_dump)) { -- cgit v1.2.3