summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2022-07-29 01:08:07 +0930
committerGitHub <noreply@github.com>2022-07-28 11:38:07 -0400
commitab08a43ec5ab7a8d82c980dc1eefc9e5d71e926d (patch)
treed4f2090229f0e752f638c97c57997afa0a86d2c4 /test/ruby
parent18b1e5e6dbef9bb0c265e57e1267840d7c13cd88 (diff)
YJIT: Teach getblockparamproxy to handle the no-block case without exiting (#6191)
Teach getblockparamproxy to handle the no-block case without exiting Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email>
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_yjit.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index f8fc4f21ef..37e72dcafa 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -513,6 +513,22 @@ class TestYJIT < Test::Unit::TestCase
RUBY
end
+ def test_getblockparamproxy_with_no_block
+ # Currently side exits on the send
+ assert_compiles(<<~'RUBY', insns: [:getblockparamproxy], exits: { send: 2 })
+ def bar
+ end
+
+ def foo &blk
+ bar(&blk)
+ bar(&blk)
+ end
+
+ foo
+ foo
+ RUBY
+ end
+
def test_send_splat
assert_compiles(<<~'RUBY', result: "3#1,2,3/P", exits: {})
def internal_method(*args)