summaryrefslogtreecommitdiff
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
commitb9801bb8b2f5ce91755e0076d79140a72ff94d6a (patch)
tree718b6d2e83b76ec2ec4d25a90fe5572e275c289f
parentadac7792180d678d7ca47a9aa523efff2b1ed4c3 (diff)
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
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index ffab48419b8..c38725e3f0b 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;