summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 9c206157e..f78564fb8 100644
--- a/src/string.c
+++ b/src/string.c
@@ -717,7 +717,7 @@ noregexp(mrb_state *mrb, mrb_value self)
static void
regexp_check(mrb_state *mrb, mrb_value obj)
{
- if (!memcmp(mrb_obj_classname(mrb, obj), REGEXP_CLASS, sizeof(REGEXP_CLASS) - 1)) {
+ if (mrb_regexp_p(mrb, obj)) {
noregexp(mrb, obj);
}
}