summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-31 04:00:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-31 04:00:17 +0000
commit74d5623029b0b8fb987a45190f3a3eac082990e1 (patch)
tree7098f68924d61777d091df010681e173627091a5 /marshal.c
parente474ae633851e9956a94bd96fc40540740a367c0 (diff)
* variable.c (rb_obj_classname): new function.
* string.c (rb_str_dup): should preserve original's class (but not hidden singleton class). * string.c (rb_str_substr): ditto. * parse.y: backout EXPR_CMDARG removal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/marshal.c b/marshal.c
index 9002d92..4c81c79 100644
--- a/marshal.c
+++ b/marshal.c
@@ -313,7 +313,7 @@ w_uclass(obj, base_klass, arg)
w_extended(klass, arg);
if (klass != base_klass) {
w_byte(TYPE_UCLASS, arg);
- w_unique(rb_class2name(CLASS_OF(obj)), arg);
+ w_unique(rb_obj_classname(obj), arg);
}
}
@@ -518,7 +518,7 @@ w_object(obj, arg, limit)
VALUE mem;
long i;
- w_unique(rb_class2name(CLASS_OF(obj)), arg);
+ w_unique(rb_obj_classname(obj), arg);
w_long(len, arg);
mem = rb_struct_iv_get(rb_obj_class(obj), "__member__");
if (mem == Qnil) {
@@ -544,7 +544,7 @@ w_object(obj, arg, limit)
if (!rb_respond_to(obj, s_dump_data)) {
rb_raise(rb_eTypeError,
"class %s needs to have instance method `_dump_data'",
- rb_class2name(CLASS_OF(obj)));
+ rb_obj_classname(obj));
}
v = rb_funcall(obj, s_dump_data, 0);
w_object(v, arg, limit);
@@ -553,7 +553,7 @@ w_object(obj, arg, limit)
default:
rb_raise(rb_eTypeError, "can't dump %s",
- rb_class2name(CLASS_OF(obj)));
+ rb_obj_classname(obj));
break;
}
}