diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-12-27 11:21:46 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-03-15 13:59:11 +0900 |
commit | ce47ee00ae295b31dc023afb935a60ecc39a1f4b (patch) | |
tree | aae50ba7487dba8f10c2ed7d473db0f9deb7aa39 /bootstraptest | |
parent | 04a2550928c3e0122e976fcf87c56f59b8a071ff (diff) |
Fix indirect counter increment
`*pcnt++` just dereferences `pcnt` then increments the local variable,
but has no side effect.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7496
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_ractor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |