aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-03 12:35:25 +0000
committerrhe <rhe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-03 12:35:25 +0000
commitef1d26e5b0eb12208681e7b1504dabd3e9beeed7 (patch)
tree718b6d2e83b76ec2ec4d25a90fe5572e275c289f /vm_insnhelper.c
parent92dd9eaef50469a814880bfc86a54dfe768546fc (diff)
downloadruby-ef1d26e5b0eb12208681e7b1504dabd3e9beeed7.tar.gz
vm_insnhelper.c: fix opt_regexpmatch2 instruction
A fix-up for r58390 ("split insns.def into functions", 2017-04-18) which accidentally swapped the arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index ffab48419b..c38725e3f0 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3717,9 +3717,9 @@ vm_opt_regexpmatch1(VALUE recv, VALUE obj)
static VALUE
vm_opt_regexpmatch2(VALUE recv, VALUE obj)
{
- if (CLASS_OF(obj) == rb_cString &&
+ if (CLASS_OF(recv) == rb_cString &&
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
- return rb_reg_match(recv, obj);
+ return rb_reg_match(obj, recv);
}
else {
return Qundef;