summaryrefslogtreecommitdiff
path: root/test/ruby/test_jit.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-06 02:35:37 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-06 02:35:37 +0000
commit4d1163b182bdd572edaa44ff000240d49acc09d6 (patch)
tree71b29cca7427a65961249cfc6c40b4da4efca630 /test/ruby/test_jit.rb
parenta26d525ae453fc59a8591d544cdba80f5e31900d (diff)
Resurrect a test dropped in r67442
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r--test/ruby/test_jit.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 332d6fc2ed..9380ee98e1 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -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