Your infuriating Ruby puzzle of the day is why does this code output "true"https://gist.github.com/Hamled/a7ea5a954008ff119bd0687638566223 …
-
-
Note that only the parser saw a new local variable `bar` being introduced at line 8. Line 8 is never actually executed
Show this thread -
Note also that the local variable `bar` introduced at line 8 has indescribably awful scope: it encompasses lines 8, 9, 10 and 11, but not 7
Show this thread -
Of course, every programming language has horrors such as this baked into it. The real question is this: are there industry standard Ruby linting tools in common use, which throw a build failure over such code? There are for e.g. JavaScript
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.