summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_yjit.rb21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index 5347028550..cc9507aff4 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -547,8 +547,7 @@ class TestYJIT < Test::Unit::TestCase
end
def test_getblockparamproxy
- # Currently two side exits as OPTIMIZED_METHOD_TYPE_CALL is unimplemented
- assert_compiles(<<~'RUBY', insns: [:getblockparamproxy])
+ assert_compiles(<<~'RUBY', insns: [:getblockparamproxy], exits: {})
def foo &blk
p blk.call
p blk.call
@@ -559,6 +558,24 @@ class TestYJIT < Test::Unit::TestCase
RUBY
end
+ def test_ifunc_getblockparamproxy
+ assert_compiles(<<~'RUBY', insns: [:getblockparamproxy], exits: {})
+ class Foo
+ include Enumerable
+
+ def each(&block)
+ block.call 1
+ block.call 2
+ block.call 3
+ end
+ end
+
+ foo = Foo.new
+ foo.map { _1 * 2 }
+ foo.map { _1 * 2 }
+ RUBY
+ end
+
def test_send_blockarg
assert_compiles(<<~'RUBY', insns: [:getblockparamproxy, :send], exits: {})
def bar