From 2adf4008deab55a039d73c0cc667a53bdd94c728 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 10 Dec 2001 18:21:31 +0000 Subject: * object.c (rb_class_real): follow included modules. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ object.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 41bb3b592..ad40b3644 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 11 03:17:19 2001 Nobuyoshi Nakada + + * object.c (rb_class_real): follow included modules. + Mon Dec 10 23:37:51 2001 Usaku Nakamura * util.h: change prototype of ruby_qsort() to accord with its diff --git a/object.c b/object.c index 7a4b1e208..f77d3edc1 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; } -- cgit