[前][次][番号順一覧][スレッド一覧]

ruby-changes:47617

From: rhe <ko1@a...>
Date: Sun, 3 Sep 2017 21:35:30 +0900 (JST)
Subject: [ruby-changes:47617] rhe:r59733 (trunk): vm_insnhelper.c: fix opt_regexpmatch2 instruction

rhe	2017-09-03 21:35:25 +0900 (Sun, 03 Sep 2017)

  New Revision: 59733

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59733

  Log:
    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.

  Modified files:
    trunk/vm_insnhelper.c
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 59732)
+++ vm_insnhelper.c	(revision 59733)
@@ -3717,9 +3717,9 @@ vm_opt_regexpmatch1(VALUE recv, VALUE ob https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3717
 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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]