1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
rhe 2017-09-03 12:35:25 +00:00
parent adac779218
commit b9801bb8b2

View file

@ -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;