From 640b162b51a704d890c44af9c76fffa4eaf28ca9 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 3 Sep 2021 16:06:32 -0700 Subject: Exit when the object is frozen Exit when the object is frozen, also add tests --- test/ruby/test_yjit.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3