From eaab0aa79ab884328fc698aaf0b696e656dc5188 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Oct 2001 14:32:51 +0000 Subject: [PATCH] * 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 --- ChangeLog | 8 ++++++++ marshal.c | 4 ++-- version.h | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bb4043e5fa..9a747b9c51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Oct 19 17:55:14 2001 Nobuyoshi Nakada + + * 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) + Wed Oct 17 14:12:50 2001 Nobuyoshi Nakada * variable.c (alias_fixup): added. ad hoc support for ordinary diff --git a/marshal.c b/marshal.c index 318292b125..bbc953ddda 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"); } diff --git a/version.h b/version.h index ecf8aaa291..8e3e276976 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.1" -#define RUBY_RELEASE_DATE "2001-10-17" +#define RUBY_RELEASE_DATE "2001-10-19" #define RUBY_VERSION_CODE 171 -#define RUBY_RELEASE_CODE 20011017 +#define RUBY_RELEASE_CODE 20011019