From: "David A. Black" Date: 2007-09-17T23:19:47+09:00 Subject: Re: Newbie help Hi -- On Mon, 17 Sep 2007, David A. Black wrote: > Hi -- > > On Mon, 17 Sep 2007, 7stud -- wrote: > >> unknown wrote: >>>> After editing that sentence a couple of times, I completely changed the >>>> meaning into something quite confusing. A symbol *always* refers to a >>>> string. That should read: >>> >>> I'm not sure I'd put it that way. A symbol, like a string, can always >>> be represented by characters, but I don't think a symbol actually >>> refers to a string, any more than the string refers to the symbol. But >>> I may be misunderstanding what you mean. >>> >> >> Then where is the error in this diagram: >> >> >> s1 = :hello >> s2 = :hello >> s3 = :hello >> >> "hello" >> ^ >> | >> | >> symbol_obj >> id:2545934 >> ^ ^ ^ >> | | | >> s1 s2 s3 > > If the top arrow means that the symbol :hello contains a reference to > a string "hello", in the same way that s1-3 are bound to references to > :hello, then I would say that's the error. Leaving aside the immediate value thing for the moment :-) David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)