diff options
author | Max Bernstein <[email protected]> | 2025-06-05 16:54:25 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2025-06-06 16:17:54 +0900 |
commit | 3246bbd32500bff86f32db0dd3cafdd648650afa (patch) | |
tree | 60533edb5212332c194979869a0692d019ef99c7 /test/ruby | |
parent | 6a46ca31a7d4999e9788896445fbb53d049882ab (diff) |
ZJIT: Add codegen for uncached setinstancevariable
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13527
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_zjit.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |