aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def6
1 files changed, 5 insertions, 1 deletions
diff --git a/insns.def b/insns.def
index 53e22223cd..a73501f245 100644
--- a/insns.def
+++ b/insns.def
@@ -2080,7 +2080,11 @@ opt_regexpmatch1
(VALUE obj)
(VALUE val)
{
- val = rb_reg_match(r, obj);
+ if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
+ val = rb_reg_match(r, obj);
+ } else {
+ val = rb_funcall(r, idEqTilde, 1, obj);
+ }
}
/**