Answer Posted / abhishek shukla
Symbol refers to the same memory location where string
generates a new id every time for eg.
STRING
irb(main):019:0> "ruby".object_id
=> 24095860
irb(main):020:0> "ruby".object_id
=> 24092310
irb(main):021:0> "ruby".object_id
=> 24088760
irb(main):022:0>
SYMBOL
irb(main):022:0> :ruby.object_id
=> 102978
irb(main):023:0> :ruby.object_id
=> 102978
irb(main):024:0> :ruby.object_id
=> 102978
irb(main):025:0> :ruby.object_id
=> 102978
irb(main):026:0>
Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
Explain about restful architecture?
Explain the controller in rails?
what are helpers and how to use helpers in ror?
what is the use of super function in ruby on rails?
Where does the start_tabnav gets informations for tabs rendering in ruby rail?
How you run your Rails Application without creating database ?
what is the difference between calling super() and super call?
What is the Install rail package?
who developed rails?
What is the importance of rjs?
When are self.up and self.down methods used?
What are the functions performed by rails migration?
What is active record in rails?
What is the use of the super function in ruby on rails?
Explain me what is the role of rails controller?