diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | encoding.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Feb 28 22:19:14 2008 NARUSE, Yui <naruse@ruby-lang.org> + + * encoding.c (enc_capable): IMMEDIATE_P doesn't include Qnil and Qfalse. + use SPECIAL_CONST_P. + Thu Feb 28 19:45:52 2008 NARUSE, Yui <naruse@ruby-lang.org> * encoding.c (enc_find): check type of argument and convert to String diff --git a/encoding.c b/encoding.c index 6cf32a81df..5c24c98505 100644 --- a/encoding.c +++ b/encoding.c @@ -535,7 +535,7 @@ rb_enc_find(const char *name) static inline int enc_capable(VALUE obj) { - if (IMMEDIATE_P(obj)) return Qfalse; + if (SPECIAL_CONST_P(obj)) return Qfalse; switch (BUILTIN_TYPE(obj)) { case T_STRING: case T_REGEXP: |