2008/10/31 Yuh-Ruey Chen <maian330 / gmail.com>:
> x = 10
>
> def foo
>        # how to access x from here?
> end
>
> class Klass
>        # how to access x from here?
>        def bar
>                # how to access x from here?
>        end
> end
>
> And no, I don't want to have to use global variables - that would just
> be pollution and would be incredibly unwieldy in large projects.

What is the difference between your "local" variable x, which should
be accessible from everywhere, and a global variable?

Regards,
Pit