summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorAiden Fox Ivey <aiden.foxivey@shopify.com>2025-04-07 16:19:28 -0400
committerTakashi Kokubun <takashikkbn@gmail.com>2025-04-18 21:53:01 +0900
commit164bd8e1a69680867c6fe0dfde46afb5eb68552e (patch)
tree01bc58cbb18609fd515049ccf60424dd38686fe3 /test/ruby
parent0e766c9014dde24e71f565e95ff696f5ed1e7fe8 (diff)
Add codegen support for ArrayDup
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_zjit.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb
index 444df8e044..4df420c7c7 100644
--- a/test/ruby/test_zjit.rb
+++ b/test/ruby/test_zjit.rb
@@ -187,6 +187,13 @@ class TestZJIT < Test::Unit::TestCase
}, call_threshold: 2
end
+ def test_array_dup
+ assert_compiles '[1, 2, 3]', %q{
+ def test = [1,2,3]
+ test
+ }
+ end
+
def test_if
assert_compiles '[0, nil]', %q{
def test(n)