What is the definition of the scope of a local variable?
A new scope for a local variable is introduced in the toplevel, a class (module) definition, a method defintion. In a procedure block a new scope is introduced but you can access to a local variable outside the block. The scope in a block is special because a local variable should be localized in Thread and Proc objects.