diff --git a/ChangeLog b/ChangeLog index 94a4a637b5..4952787aae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ Fri Aug 8 12:33:17 2003 WATANABE Hirofumi * bcc32/Makefile.sub: rubyw.exe should be a Windows GUI program. add the -aa option to WLDFLAGS. +Fri Aug 8 11:29:26 2003 Koji Arai + + * marshal.c (w_object): should set `c_arg' at first. + Fri Aug 8 03:22:28 2003 GOTOU Yuuzou * lib/webrick/httputils.rb (FormData#list): should not take diff --git a/marshal.c b/marshal.c index 03992f6bdd..84125f767e 100644 --- a/marshal.c +++ b/marshal.c @@ -434,6 +434,10 @@ w_object(obj, arg, limit) rb_raise(rb_eArgError, "exceed depth limit"); } + limit--; + c_arg.limit = limit; + c_arg.arg = arg; + if (ivtbl = rb_generic_ivar_table(obj)) { w_byte(TYPE_IVAR, arg); } @@ -466,10 +470,6 @@ w_object(obj, arg, limit) else { long num; - limit--; - c_arg.limit = limit; - c_arg.arg = arg; - if (st_lookup(arg->data, obj, &num)) { w_byte(TYPE_LINK, arg); w_long(num, arg);