From 5a3e59d284a20bf7bda78b828dfce522267acee8 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 29 Sep 2007 00:13:58 +0000 Subject: [PATCH] * object.c (rb_class_real): use BUILTIN_TYPE instead of TYPE. access flags directly intead of FL_TEST. they are enough because cl argument is a class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ object.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b1719464c0..24363fe6d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Sep 29 09:12:02 2007 Tanaka Akira + + * object.c (rb_class_real): use BUILTIN_TYPE instead of TYPE. + access flags directly intead of FL_TEST. + they are enough because cl argument is a class. + Sat Sep 29 08:57:15 2007 Nobuyoshi Nakada * include/ruby/win32.h (strcasecmp): needed for type_strcasehash. diff --git a/object.c b/object.c index e2b3e43bd0..a6ded56724 100644 --- a/object.c +++ b/object.c @@ -99,7 +99,7 @@ rb_obj_equal(VALUE obj1, VALUE obj2) VALUE rb_class_real(VALUE cl) { - while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) { + while ((RBASIC(cl)->flags & FL_SINGLETON) || BUILTIN_TYPE(cl) == T_ICLASS) { cl = RCLASS_SUPER(cl); } return cl;