Actions
Bug #11659
closedStrange behavior setting previously-undefined local variables with a statement modifier
Bug #11659:
Strange behavior setting previously-undefined local variables with a statement modifier
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
Description
Consider a previously-undefined local variable var1:
Consider previously-undefined local variables var1 and var2:
Consider a previously-undefined local variable var3:
Consider a previously-undefined local variable var4:
Oops! Why is var4 nil? Logically, considering the prior examples, it should be 'default'. Or are we missing something?
http://stackoverflow.com/questions/33537059/unless-defined-is-not-working-in-my-code
Actions