From 113080936355d2e43dbbb0bcd0b09bf93966f2f6 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Mon, 10 Mar 2025 14:52:06 -0400 Subject: Add small test for setlocal --- test/ruby/test_zjit.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index 3495c1254a..5265aac246 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -30,6 +30,16 @@ class TestZJIT < Test::Unit::TestCase } end + def test_setlocal + assert_compiles '3', %q{ + def test(n) + m = n + m + end + test(3) + } + end + def test_opt_plus_const assert_compiles '3', %q{ def test = 1 + 2 -- cgit v1.2.3