From: "David A. Black" Date: 2005-07-26T08:57:08+09:00 Subject: Re: Trying to understand symbols Hi -- On Tue, 26 Jul 2005, Sam Kong wrote: > Before I met Ruby, I regarded 'symbol' as the one in the text. > But Ruby's symbol seems to have its unique meaning and usage. > Can anybody clarify that? A symbol object, like :x, is different from what one might generically call a symbol. So here: sym = :x sym is a symbol in a generic or general sense, whereas :x is an instance of class Symbol. When people talk about things like using symbols as hash keys, they mean instances of Symbol -- :x and things like that. It's common usage to call things like sym (above) symbols too, so there's some overloading of the term. David -- David A. Black dblack@wobblini.net