On Aug 29, 2007, at 8:25 PM, grocery_stocker wrote:

> How come when I do something like
>
> #!/usr/bin/ruby -w
>
> def n_times(thing)
>         return thing
> end
>
> pi = n_times(23);
> puts pi
>
> the variable 'thing' doesn't go out of scope.

I think it does. The variable 'thing' from #n_times is not visible at  
top level. If you were to do

    puts thing

at this point, you would get an error.

Regards, Morton