summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 87d8b06ece..fc79bdda6e 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -439,6 +439,21 @@ class TestZJIT < Test::Unit::TestCase
}, call_threshold: 2
end
+ def test_send_nil_block_arg
+ assert_compiles 'false', %q{
+ def test = block_given?
+ def entry = test(&nil)
+ test
+ }
+ end
+
+ def test_send_symbol_block_arg
+ assert_compiles '["1", "2"]', %q{
+ def test = [1, 2].map(&:to_s)
+ test
+ }
+ end
+
def test_forwardable_iseq
assert_compiles '1', %q{
def test(...) = 1