summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-29 23:10:25 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-29 23:10:25 +0000
commit727625d9d43dfc816b21a6093cbd5d303e9e8247 (patch)
tree46a02cc28977b17a16754ee470a45a9d7214a9b7 /encoding.c
parent5159f500fdab17c053075c7dd62b5050fdb80bc5 (diff)
* encoding.c (enc_compatible_p): use TYPE not BUILTIN_TYPE.
[ruby-dev:36048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/encoding.c b/encoding.c
index bb6f5b269e..44e80b955f 100644
--- a/encoding.c
+++ b/encoding.c
@@ -880,13 +880,11 @@ enc_compatible_p(VALUE klass, VALUE str1, VALUE str2)
{
rb_encoding *enc;
- if (SPECIAL_CONST_P(str1) ||
- BUILTIN_TYPE(str1) != T_STRING && BUILTIN_TYPE(str1) != T_REGEXP) {
+ if (SPECIAL_CONST_P(str1) || TYPE(str1) != T_STRING && TYPE(str1) != T_REGEXP) {
rb_raise(rb_eTypeError, "wrong argument type %s (expected String or Regexp)",
rb_obj_classname(str1));
}
- if (SPECIAL_CONST_P(str2) ||
- BUILTIN_TYPE(str2) != T_STRING && BUILTIN_TYPE(str2) != T_REGEXP) {
+ if (SPECIAL_CONST_P(str2) || TYPE(str2) != T_STRING && TYPE(str2) != T_REGEXP) {
rb_raise(rb_eTypeError, "wrong argument type %s (expected String or Regexp)",
rb_obj_classname(str2));
}