diff options
author | Aaron Patterson <[email protected]> | 2021-09-03 16:06:32 -0700 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:39 -0400 |
commit | 640b162b51a704d890c44af9c76fffa4eaf28ca9 (patch) | |
tree | 94614f3d8f56a4bb13905cfe78d8b9f3ed00845b /test | |
parent | 376f5ec1a1c744ca6a78726dbf9886e30b3400fa (diff) |
Exit when the object is frozen
Exit when the object is frozen, also add tests
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_yjit.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 587e6d3f1d..90940009e2 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -75,6 +75,20 @@ class TestYJIT < Test::Unit::TestCase assert_no_exits('"i am a string #{true}"') end + def test_compile_attr_set + assert_no_exits(<<~EORB) + class Foo + attr_accessor :bar + end + + foo = Foo.new + foo.bar = 3 + foo.bar = 3 + foo.bar = 3 + foo.bar = 3 + EORB + end + def test_compile_regexp assert_no_exits('/#{true}/') end |