summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 8c4ddd598e..8f83e858a6 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -1902,6 +1902,17 @@ class TestZJIT < Test::Unit::TestCase
}, call_threshold: 2
end
+ def test_raise_in_second_argument
+ assert_compiles '{ok: true}', %q{
+ def write(hash, key)
+ hash[key] = raise rescue true
+ hash
+ end
+
+ write({}, :ok)
+ }
+ end
+
private
# Assert that every method call in `test_script` can be compiled by ZJIT