summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-17 09:36:05 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-17 09:36:05 +0000
commit73a47246f27d7967ec8af5fb7ce43064d4a64d40 (patch)
treed3f505227c0ff960dce425a24c1722e6e29d5ef8 /marshal.c
parent50cc115b7e29418bf8cc1713717e72912f45e74a (diff)
* eval.c (rb_mod_nesting): load wrapping module should appear in
Module#nesting list. (ruby-bugs-ja:PR#328) * eval.c (rb_thread_remove): free stack buffer on remove. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/marshal.c b/marshal.c
index e52508db25..0e54f42cc8 100644
--- a/marshal.c
+++ b/marshal.c
@@ -43,7 +43,7 @@ shortlen(len, ds)
#endif
#define MARSHAL_MAJOR 4
-#define MARSHAL_MINOR 7
+#define MARSHAL_MINOR 8
#define TYPE_NIL '0'
#define TYPE_TRUE 'T'
@@ -371,24 +371,24 @@ w_object(obj, arg, limit)
if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
+ if (ivtbl = rb_generic_ivar_table(obj)) {
+ w_byte(TYPE_IVAR, arg);
+ }
+
st_add_direct(arg->data, obj, arg->data->num_entries);
if (rb_respond_to(obj, s_dump)) {
VALUE v;
- w_byte(TYPE_USERDEF, arg);
- w_unique(rb_class2name(CLASS_OF(obj)), arg);
+ w_class(TYPE_USERDEF, obj, arg);
v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
if (TYPE(v) != T_STRING) {
rb_raise(rb_eTypeError, "_dump() must return String");
}
w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
+ if (ivtbl) w_ivar(ivtbl, &c_arg);
return;
}
- if (ivtbl = rb_generic_ivar_table(obj)) {
- w_byte(TYPE_IVAR, arg);
- }
-
switch (BUILTIN_TYPE(obj)) {
case T_CLASS:
if (FL_TEST(obj, FL_SINGLETON)) {