mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_optimization.rb: fix compile kwarg
Fixes: r62177 ("compile.c: fix string Range optimization with FSL") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a08d41ea41
commit
dc9ce32864
1 changed files with 3 additions and 2 deletions
|
@ -557,8 +557,9 @@ class TestRubyOptimization < Test::Unit::TestCase
|
|||
when "1.8.0"..."1.8.8" then :bar
|
||||
end
|
||||
end;
|
||||
[ nil, { frozen_string_literal: true } ].each do |opt|
|
||||
iseq = RubyVM::InstructionSequence.compile(code, nil, nil, opt)
|
||||
[ true, false ].each do |opt|
|
||||
iseq = RubyVM::InstructionSequence.compile(code,
|
||||
frozen_string_literal: opt)
|
||||
insn = iseq.disasm
|
||||
assert_match %r{putobject\s+#{Regexp.quote('"1.8.0"..."1.8.8"')}}, insn
|
||||
assert_match %r{putobject\s+#{Regexp.quote('"2.0.0".."2.3.2"')}}, insn
|
||||
|
|
Loading…
Reference in a new issue