How does a symbol differ from a string?
Answer / Yati Bajpai
In Ruby, symbols are objects that represent immutable strings with a colon at the end (e.g., `:symbol`). Symbols have the same value as their corresponding strings but provide better performance when used as keys in hashes or for method names because they are cached internally.
| Is This Answer Correct ? | 0 Yes | 0 No |
Write the command to get installed Ruby version in your system?
Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?
What is the difference between extend and include?
What function converts all html special symbols to html entities in ruby?
Mention what is the command to create a migration?
What must you do first before you can invoke an unboundmethod object?
difference between activesupport's “hashwithindifferentaccess” and ruby's “hash”?
Explain some differences between ruby and python.
what is class libraries in Ruby?
What is the difference between calling super and calling super()?
Tell me what is the difference between active support's “hashwithindifferent” and ruby's “hash” ?
what is the Notation used for denoting class variables in Ruby?