From 3246bbd32500bff86f32db0dd3cafdd648650afa Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 5 Jun 2025 16:54:25 -0400 Subject: ZJIT: Add codegen for uncached setinstancevariable --- test/ruby/test_zjit.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index d4f53dcb5b..3b64887f92 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -559,6 +559,15 @@ class TestZJIT < Test::Unit::TestCase } end + def test_setinstancevariable + assert_compiles '1', %q{ + def test() = @foo = 1 + + test() + @foo + } + end + # tool/ruby_vm/views/*.erb relies on the zjit instructions a) being contiguous and # b) being reliably ordered after all the other instructions. def test_instruction_order -- cgit v1.2.3