diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/ruby/ruby.h | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Sep 14 10:44:47 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/ruby.h (RB_TYPE_P): should not use BUILTIN_TYPE for + special constants. + Mon Sep 14 10:08:19 2009 NARUSE, Yui <naruse@ruby-lang.org> * string.c (rb_str_inspect): use rb_enc_mbc_to_codepoint diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index a9cb9b0fa..2d6ba66e5 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1258,7 +1258,7 @@ rb_type(VALUE obj) ((type) == T_NIL) ? ((obj) == Qnil) : \ ((type) == T_UNDEF) ? ((obj) == Qundef) : \ ((type) == T_SYMBOL) ? SYMBOL_P(obj) : \ - (BUILTIN_TYPE(obj) == (type))) + (!SPECIAL_CONST_P(obj) && BUILTIN_TYPE(obj) == (type))) #ifdef __GNUC__ #define rb_type_p(obj, type) \ |