what you've done in this case is have a variable that holds and points back to the symbol. in a sense that variable is a symbol but the symbol it refers to had to be created with the normal Ruby syntax. here's a good link that might help you understand all that complexities of how symbols work in Ruby: http://www.troubleshooters.com/codecorn/ruby/symbols.htm Beware it's a long read. :)
hope that helps. RSL On Wed, Jul 15, 2009 at 2:21 AM, shusseina <[email protected]> wrote: > > From what I have read, in Ruby a Symbol is prefixed with a colon as > in :my_symbol, yet I can do this... > > >> :my_symbol > => :my_symbol > >> my_variable = :my_symbol > => :my_symbol > >> :my_symbol.class > => Symbol > >> :my_symbol.object_id > => 199218 > >> my_variable.class > => Symbol > >> my_variable.object_id > => 199218 > > Comments? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

