Replies: 1 comment
-
As said shadowing is about using name of a variable. irb(main):001:1* if 5 == 5
irb(main):002:1* a = 10
irb(main):003:0> end
=> 10
irb(main):004:0> a
=> 10 So your variable |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I guess this is nitpicking, but the
Lint/ShadowingOuterLocalVariable
complains about something that I believe is valid.I know this can be written more nicely, to avoid this, but I wonder if
userfile
should be considered "outer variable" if it is a) in a block, and b) that block always returns.As I see it, I am not shadowing anything - the
userfile
variable is used independently in two different blocks, and will never intersect.Beta Was this translation helpful? Give feedback.
All reactions