Fix indirect counter increment
`*pcnt++` just dereferences `pcnt` then increments the local variable, but has no side effect.
This commit is contained in:
parent
04a2550928
commit
ce47ee00ae
Notes:
git
2025-04-09 13:49:37 +00:00
@ -1494,8 +1494,9 @@ assert_equal "#{n}#{n}", %Q{
|
|||||||
|
|
||||||
# NameError
|
# NameError
|
||||||
assert_equal "ok", %q{
|
assert_equal "ok", %q{
|
||||||
|
obj = "".freeze # NameError refers the receiver indirectly
|
||||||
begin
|
begin
|
||||||
bar
|
obj.bar
|
||||||
rescue => err
|
rescue => err
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user