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

Resurrect a test dropped in r67442

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2019-04-06 02:35:37 +00:00
parent a26d525ae4
commit 4d1163b182

View file

@ -183,6 +183,18 @@ class TestJIT < Test::Unit::TestCase
assert_compile_once('2', result_inspect: '2', insns: %i[putobject])
end
def test_compile_insn_definemethod
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hellohello', success_count: 2, insns: %i[definemethod])
begin;
print 2.times.map {
def method_definition
'hello'
end
method_definition
}.join
end;
end
def test_compile_insn_putstring_concatstrings_tostring
assert_compile_once('"a#{}b" + "c"', result_inspect: '"abc"', insns: %i[putstring concatstrings tostring])
end