From: dblack@... Date: 2007-01-26T09:44:19+09:00 Subject: Re: Ruby language question Hi -- On Fri, 26 Jan 2007, Neville Franks wrote: > Back to my original code snippet. Isn't @size = val redundant? Not if you want @size set to val :-) Consider this: class C def size=(val) puts "Nice try!" end end c = C.new c.size = 20 # Nice try! The instance variable @size is nowhere to be seen, and has not been involved with any of this. size= is just a method name. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)