When you set a variable in a section of code that is never executed, the variable will still be defined.
if false a = 'whatever' end puts a # => "nil" # Does NOT raise 'NameError: undefined local variable or method `a' for main:Object'
This post was submitted by Olivier El Mekki.
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.