mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Use mrb_regexp_p to check regexp.
This commit is contained in:
@@ -65,7 +65,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);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user