I think of symbols as similar to numbers.  How about:

>> 1
=> 1
>> my_variable = 1
=> 1
>> 1.class
=> Fixnum
>> 1.object_id
=> 3
>> my_variable.class
=> Fixnum
>> my_variable.object_id
=> 3

Is it Symbols that you're questioning, or is it that :my_symbol and
my_variable have the same object_id?

They have the same object_id because they're pointing at the same
object.

Bryan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to