summaryrefslogtreecommitdiff
path: root/test/ruby/test_jit.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-07-14 18:04:14 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-07-14 18:04:19 +0900
commitd30d404bc4b848f84959799b543de4bdbd8eef2b (patch)
tree4b89685b73c05fae3d7d8013efaed8be1dbea193 /test/ruby/test_jit.rb
parent043e3d2cdc02a3571e3e2c3b9252a65d3c049740 (diff)
MJIT Support for getblockparamproxy
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r--test/ruby/test_jit.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 0cfc980aac..727043fd00 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -18,7 +18,6 @@ class TestJIT < Test::Unit::TestCase
# trace_* insns are not compiled for now...
TEST_PENDING_INSNS = RubyVM::INSTRUCTION_NAMES.select { |n| n.start_with?('trace_') }.map(&:to_sym) + [
# not supported yet
- :getblockparamproxy,
:defineclass,
:opt_call_c_function,
@@ -94,7 +93,18 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_getblockparamproxy
- skip "support this in mjit_compile"
+ assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '4', success_count: 3, insns: %i[getblockparamproxy])
+ begin;
+ def bar(&b)
+ b.call
+ end
+
+ def foo(&b)
+ bar(&b) * bar(&b)
+ end
+
+ print foo { 2 }
+ end;
end
def test_compile_insn_getspecial