From: Trans Date: 2005-07-29T21:21:01+09:00 Subject: Re: make local var visible You could do: Foo=["a","b","c"] def mfoo Foo.each do |f| p f end end # go-go-go! mfoo Yet I tend to agree. Even in classes, it just seems so much more elegant: class Bar foo = ["a","b","c"] # attribute def mfoo foo.each do |f| p f end end end But the only way to do that woud be: 1) Irregular attr syntax. attr foo = ["a","b","c"] 2) Alternate assignment operator. foo := ["a","b","c"] 3) Prefixed local vars. %local_var = 'what have you' I myself have suggested before that foo = 10 be essentially equivalent to def foo ; 10 ; end And that constants and methods share the same namespace. T.