From: Daniel Brockman Date: 2005-07-26T17:34:25+09:00 Subject: Re: Trying to understand symbols Martin DeMello writes: >> So that would mean that Rails's use of symbols >> (e.g. attr_reader :foo) is just a convention, and Rails >> uses the symbol-name to go look up an Object with the >> same name, thus appearing to releate the Symbol to >> the Object? > > It's a common ruby convention, but yes, attr_reader > etc. are just methods that take Symbol arguments, and > could have been written to take String args instead. In fact, they do take string arguments. class Foo attr_accessor "bar" end foo = Foo.new foo.bar = 123 foo.bar #=> 123 -- Daniel Brockman So really, we all have to ask ourselves: Am I waiting for RMS to do this? --TTN.