Skip to content

Commit

Permalink
Use mrb_regexp_p to check regexp.
Browse files Browse the repository at this point in the history
  • Loading branch information
take-cheeze committed Apr 17, 2014
1 parent d4a510f commit 699964a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mrbgems/mruby-string-utf8/src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 699964a

Please sign in to comment.