* 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
This commit is contained in:
naruse 2008-02-28 13:22:29 +00:00
parent 6f99342c92
commit 5eafc201d8
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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: