summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-06-08 22:38:50 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-06-08 22:39:18 -0700
commit90b240d1274b8597e02f94cb644da3aa137241b6 (patch)
tree8fcf9834a5599fb341345a5edd153b20850bfd8e /test
parent2931957d6ff16b5c095f6e8095384c98130133ad (diff)
downloadruby-90b240d1274b8597e02f94cb644da3aa137241b6.tar.gz
Fix MJIT's ISEQ_BODY macro usage at 5f10bd634fb
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_mjit.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_mjit.rb b/test/ruby/test_mjit.rb
index 6f1ccc8402..9037dc3d80 100644
--- a/test/ruby/test_mjit.rb
+++ b/test/ruby/test_mjit.rb
@@ -621,6 +621,16 @@ class TestMJIT < Test::Unit::TestCase
end;
end
+ def test_compile_opt_pc
+ assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hello', success_count: 1)
+ begin;
+ def test(arg = 'hello')
+ print arg
+ end
+ test
+ end;
+ end
+
def test_mjit_output
out, err = eval_with_jit('5.times { puts "MJIT" }', verbose: 1, min_calls: 5)
assert_equal("MJIT\n" * 5, out)