ndrochak / gol.com (Nick Drochak) writes:

> Since Ruby does not require a variable to be declared, do people find
> that they often have bugs related to mistyping variable names?

Actually, this is not quite a true statement.

The first assignment to a local variable that Ruby sees in a scope
adds that variable to the scope. If you try to use a name isn't a
variable in that scope, or that doesn't correspond to a method, you'll
get a warning:


    fred = 1
    bert = frde + 1
#=>
    undefined local variable or method `frde'


Dave