aboutsummaryrefslogtreecommitdiffstats
path: root/safe.c
diff options
context:
space:
mode:
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));
}