From ce47ee00ae295b31dc023afb935a60ecc39a1f4b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 27 Dec 2022 11:21:46 +0900 Subject: Fix indirect counter increment `*pcnt++` just dereferences `pcnt` then increments the local variable, but has no side effect. --- bootstraptest/test_ractor.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bootstraptest') diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index 96c0f276a1..f92b604d2a 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1494,8 +1494,9 @@ assert_equal "#{n}#{n}", %Q{ # NameError assert_equal "ok", %q{ + obj = "".freeze # NameError refers the receiver indirectly begin - bar + obj.bar rescue => err end begin -- cgit v1.2.3