summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-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 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