| |
|
|
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. while, until, and for are control structures and the scope is
shared with the outside of these structures. loop is a method and the appended
block introduces a new scope.
|
|