From: Dave Thomas Date: 2000-03-31T17:25:03-06:00 Subject: [ruby-talk:02317] Re: Question about attribute writers Clemens Hintze writes: > At least I would expect it! It is like answered in your FAQ! How does > Ruby determine what a variable is? It is really stright-forward, IMHO. > > Look if there was an assignment before > yes => compile a variable access > no => compile a method call. True - I asked the wrong question. Rather than asking "is this the expected behavior", I guess I meant "is this the behavior that someone would expect?" It seems to violate the principle of least surprise. Perhaps a warning would a good idea in these circumstances: warning: local variable eclipses instance method Dave -- Thomas Consulting. Innovative and successful developments with Unix, Java, C, and C++. Now in bookstores: The Pragmatic Programmer. www.pragmaticprogrammer.com/ppbook/