summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_zjit.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 7c29fdeb19..075a7765c8 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -109,6 +109,15 @@ class TestZJIT < Test::Unit::TestCase
}, insns: [:duphash]
end
+ def test_pushtoarray
+ assert_compiles '[1, 2, 3]', %q{
+ def test
+ [*[], 1, 2, 3]
+ end
+ test
+ }, insns: [:pushtoarray]
+ end
+
def test_setglobal_with_trace_var_exception
assert_compiles '"rescued"', %q{
def test