Local variable not used anymore warning...
Greetings...
The following code (and yes, this is just an example and not good Ruby code) pattern:
def test
x = 10
for i in 1..10
@z = x
x *= 10 if @z < 10000
end
end
Will indicate (by underlining) that x within the statement "x *= 10 if @z < 10000" in no longer used.
If you remove the conditional "if @z < 10000" then it's OK---it understands that x is used within the for loop. But put the conditional on it and you get the warning.
I'm using EAP RM-93.130
Mark
Please sign in to leave a comment.
Hi Mark,
Indeed this is a false warning. Thanks for submitting this, I've created an issue: http://youtrack.jetbrains.net/issue/RUBY-5841
Regards,
Oleg