mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
Exit when the object is frozen
Exit when the object is frozen, also add tests
This commit is contained in:
parent
376f5ec1a1
commit
640b162b51
3 changed files with 41 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue