summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-29 11:07:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-09-29 11:07:45 +0000
commit8e6e8e628888aa251f771ce8b3fe30a6b41a7a0e (patch)
treee531ed455f2ffb110e9a16de2161b3865a19d582 /eval_error.c
parent68f97d7851481e11ce90bb349345dc4caed00cf7 (diff)
* use RB_TYPE_P which is optimized for constant types, instead of
comparison with TYPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval_error.c b/eval_error.c
index e2763ad..cf3961c 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -202,7 +202,7 @@ rb_print_undef(VALUE klass, ID id, int scope)
}
rb_name_error(id, "undefined%s method `%s' for %s `%s'", v,
rb_id2name(id),
- (TYPE(klass) == T_MODULE) ? "module" : "class",
+ (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
rb_class2name(klass));
}
@@ -211,7 +211,7 @@ rb_print_undef_str(VALUE klass, VALUE name)
{
rb_name_error_str(name, "undefined method `%s' for %s `%s'",
RSTRING_PTR(name),
- (TYPE(klass) == T_MODULE) ? "module" : "class",
+ (RB_TYPE_P(klass, T_MODULE)) ? "module" : "class",
rb_class2name(klass));
}