diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_ractor.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index d89bf108c1..125b51bf4f 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -926,7 +926,13 @@ assert_equal 'true', %q{ @a = 'foo' @b = 'bar' end - attr_reader :a, :b + + def freeze + @c = [:freeze_called] + super + end + + attr_reader :a, :b, :c end S = Struct.new(:s1, :s2) str = "hello" @@ -967,6 +973,7 @@ assert_equal 'true', %q{ when C raise o.a.inspect unless o.a.frozen? raise o.b.inspect unless o.b.frozen? + raise o.c.inspect unless o.c.frozen? && o.c == [:freeze_called] when Rational raise o.numerator.inspect unless o.numerator.frozen? when Complex |