Actions
Bug #11103
closedReassignment in if block that is not ran, causes variable to become nil
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
Description
I came across a situation where, when reassigning a variable, inside an if statement that is evaluated to false, causes the variable to become nil.
I have included the code to reproduce the problem as a file.
Changing the line
variable = [variable]
to
@variable = [@variable]
seems to work as a temporary workaround, but this still seems to me as a pretty weird bug.
Files
Actions
Like0
Like0Like0