nagachika e$B$H?=$7$^$9!#e(B
Debian GNU/Linux e$B$Ge(B 1.9(trunk)
e$B$G0J2<$N%9%/%j%W%H$,4|BTDL$j$KF0$-$^$;$s!#e(B
$ cat test.rb
t = Time.now
p Marshal.load(Marshal.dump([t, t]))
$ ./ruby-trunk test.rb
[2008-03-28 09:44:03 +0900, “7P”]
e$B@53N$K$Oe(B Time e$B$K8B$i$:!"e(B_dump
e$B$,JV$9J8;zNs$K%$%s%9%?%s%9JQ?t$,e(B
e$BDI2C$5$l$F$$$k$h$&$J>l9g$K$*$+$7$/$J$k$h$&$G$9!#e(B
Time e$B$Oe(B nsec
e$B$N@:EY$N>pJs$r%$%s%9%?%s%9JQ?t$KF~$l$F$$$^$7$?!#e(B
e$B0J2<$O%Q%C%A$G$9!#$48!F$$/$@$5$$!#e(B
Index: marshal.c
— marshal.c (e$B%j%S%8%g%se(B 15844)
+++ marshal.c (e$B:n6H%3%T!<e(B)
@@ -574,8 +574,6 @@
else {
if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
-
st_add_direct(arg->data, obj, arg->data->num_entries);
-
{ st_data_t compat_data; rb_alloc_func_t allocator =
rb_get_alloc_func(RBASIC(obj)->klass);
@@ -592,6 +590,8 @@
if (rb_respond_to(obj, s_mdump)) {
VALUE v;
-
st_add_direct(arg->data, obj, arg->data->num_entries);
-
v = rb_funcall(obj, s_mdump, 0, 0); w_class(TYPE_USRMARSHAL, obj, arg, Qfalse); w_object(v, arg, limit);
@@ -618,9 +618,13 @@
else if (hasiv) {
w_ivar(obj, ivtbl, &c_arg);
}
-
st_add_direct(arg->data, obj, arg->data->num_entries);
-
return; }
-
st_add_direct(arg->data, obj, arg->data->num_entries);
-
switch (BUILTIN_TYPE(obj)) { case T_CLASS: if (FL_TEST(obj, FL_SINGLETON)) {