summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--object.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 41bb3b5926..ad40b36444 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Dec 11 03:17:19 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * object.c (rb_class_real): follow included modules.
+
Mon Dec 10 23:37:51 2001 Usaku Nakamura <usa@ruby-lang.org>
* util.h: change prototype of ruby_qsort() to accord with its
diff --git a/object.c b/object.c
index 7a4b1e208c..f77d3edc1d 100644
--- a/object.c
+++ b/object.c
@@ -75,6 +75,9 @@ VALUE
rb_class_real(cl)
VALUE cl;
{
+ if (TYPE(cl) == T_ICLASS) {
+ cl = RBASIC(cl)->klass;
+ }
while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
cl = RCLASS(cl)->super;
}