summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index a9cb9b0fa3..2d6ba66e5c 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) \