diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 13:22:29 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-28 13:22:29 +0000 |
commit | 5eafc201d8d27394f2bde9cd08f03c1dac36bbb8 (patch) | |
tree | 3984f6cd06d1441cb0c18a8707a32d9ee2e0ca37 | |
parent | 6f99342c92055f8a891d889fb99ab7f131962977 (diff) | |
download | ruby-5eafc201d8d27394f2bde9cd08f03c1dac36bbb8.tar.gz |
* encoding.c (enc_capable): IMMEDIATE_P doesn't include Qnil and Qfalse.
use SPECIAL_CONST_P.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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: |