summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-19 06:43:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-19 06:43:58 +0000
commite60deb155585c410b85d417002d1f4f32062de19 (patch)
treea2c527cf4353e88720cdc094e3fa2cc55dd8fd5d /marshal.c
parent87bf8b1dc31de2eaeafe5e75eaa04571926302ea (diff)
* file.c (path_check_1): should check directory sticky bits.
* process.c (security): need not to warn twice. * marshal.c (r_object): complete restoration before calling r_regist(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/marshal.c b/marshal.c
index 72ac20a..5966a76 100644
--- a/marshal.c
+++ b/marshal.c
@@ -927,11 +927,10 @@ r_object(arg)
volatile long len = r_long(arg); /* gcc 2.7.2.3 -O2 bug?? */
v = rb_ary_new2(len);
- r_regist(v, arg);
while (len--) {
rb_ary_push(v, r_object(arg));
}
- return v;
+ return r_regist(v, arg);;
}
case TYPE_HASH:
@@ -940,7 +939,6 @@ r_object(arg)
long len = r_long(arg);
v = rb_hash_new();
- r_regist(v, arg);
while (len--) {
VALUE key = r_object(arg);
VALUE value = r_object(arg);
@@ -949,7 +947,7 @@ r_object(arg)
if (type == TYPE_HASH_DEF) {
RHASH(v)->ifnone = r_object(arg);
}
- return v;
+ return r_regist(v, arg);
}
case TYPE_STRUCT:
@@ -971,7 +969,6 @@ r_object(arg)
rb_ary_push(values, Qnil);
}
v = rb_struct_alloc(klass, values);
- r_regist(v, arg);
for (i=0; i<len; i++) {
slot = r_symbol(arg);
@@ -983,6 +980,7 @@ r_object(arg)
}
rb_struct_aset(v, INT2FIX(i), r_object(arg));
}
+ r_regist(v, arg);
return v;
}
break;
@@ -1010,9 +1008,8 @@ r_object(arg)
if (TYPE(v) != T_OBJECT) {
rb_raise(rb_eArgError, "dump format error");
}
- r_regist(v, arg);
r_ivar(v, arg);
- return v;
+ return r_regist(v, arg);
}
break;