summaryrefslogtreecommitdiff
path: root/safe.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 /safe.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 'safe.c')
-rw-r--r--safe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/safe.c b/safe.c
index e2ed5979d2..05c1aa395b 100644
--- a/safe.c
+++ b/safe.c
@@ -122,7 +122,7 @@ void
rb_check_safe_str(VALUE x)
{
rb_check_safe_obj(x);
- if (TYPE(x) != T_STRING) {
+ if (!RB_TYPE_P(x, T_STRING)) {
rb_raise(rb_eTypeError, "wrong argument type %s (expected String)",
rb_obj_classname(x));
}