summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-19 14:32:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-19 14:32:51 +0000
commiteaab0aa79ab884328fc698aaf0b696e656dc5188 (patch)
tree9a8533bbb4aaa4aeaf0c8e791232d603e1cd329d /marshal.c
parent78592877b77a829ceea230ec194c0cb43430dd9c (diff)
* marshal.c (w_uclass): cloned class is not user
class. (ruby-bugs-ja#PR103) * marshal.c (r_object): Struct subclass couldn't load. (ruby-bugs-ja#PR104) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index 318292b..bbc953d 100644
--- a/marshal.c
+++ b/marshal.c
@@ -247,7 +247,7 @@ w_uclass(obj, klass, arg)
VALUE obj, klass;
struct dump_arg *arg;
{
- if (CLASS_OF(obj) != klass) {
+ if (rb_class_real(CLASS_OF(obj)) != klass) {
w_byte(TYPE_UCLASS, arg);
w_unique(rb_class2name(CLASS_OF(obj)), arg);
}
@@ -933,7 +933,7 @@ r_object(arg)
ID slot;
klass = rb_path2class(r_unique(arg));
- mem = rb_ivar_get(klass, rb_intern("__member__"));
+ mem = rb_struct_iv_get(klass, "__member__");
if (mem == Qnil) {
rb_raise(rb_eTypeError, "uninitialized struct");
}