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

Fix opt_regexpmatch1 references

This commit is contained in:
Takashi Kokubun 2019-09-02 14:33:29 +09:00
parent 83498854eb
commit c69545ae32
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD
2 changed files with 3 additions and 6 deletions

View file

@ -399,8 +399,8 @@ tests = [
! X.new ! X.new
}, },
[ 'opt_regexpmatch1', %q{ /true/ =~ 'true' && $~ }, ], [ 'opt_regexpmatch2', %q{ /true/ =~ 'true' && $~ }, ],
[ 'opt_regexpmatch1', <<-'},', ], # { [ 'opt_regexpmatch2', <<-'},', ], # {
class Regexp; def =~ other; true; end; end class Regexp; def =~ other; true; end; end
/true/ =~ 'true' /true/ =~ 'true'
}, },

View file

@ -591,11 +591,8 @@ class TestJIT < Test::Unit::TestCase
assert_compile_once('!!true', result_inspect: 'true', insns: %i[opt_not]) assert_compile_once('!!true', result_inspect: 'true', insns: %i[opt_not])
end end
def test_compile_insn_opt_regexpmatch1
assert_compile_once("/true/ =~ 'true'", result_inspect: '0', insns: %i[opt_regexpmatch1])
end
def test_compile_insn_opt_regexpmatch2 def test_compile_insn_opt_regexpmatch2
assert_compile_once("/true/ =~ 'true'", result_inspect: '0', insns: %i[opt_regexpmatch2])
assert_compile_once("'true' =~ /true/", result_inspect: '0', insns: %i[opt_regexpmatch2]) assert_compile_once("'true' =~ /true/", result_inspect: '0', insns: %i[opt_regexpmatch2])
end end