Exit when the object is frozen

Exit when the object is frozen, also add tests
This commit is contained in:
Aaron Patterson 2021-09-03 16:06:32 -07:00 committed by Alan Wu
parent 376f5ec1a1
commit 640b162b51
3 changed files with 41 additions and 0 deletions

View file

@ -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