Explain how Symbol is different from variables?
Answer / Ranveer Kumar Singh
In Ruby, Symbols are immutable objects with unique identities, while variables are mutable references to objects. Symbols can be used as keys in hashes and method names, whereas variables are used for storing values.
| Is This Answer Correct ? | 0 Yes | 0 No |
How would you implement hash in ruby internally?
Mention what is the difference between a gem and a plugin in ruby?
How an exception is handled in Ruby?
Why Ruby is known as a language of flexibility?
In Ruby, it explains about the defined operator?
Tell us how would you implement hash in ruby internally?
Tell us what is the difference between dynamic and static scaffolding?
Explain the concepts and capabilities of garbage collection feature of Ruby?
What are the different environment variables present in the ruby?
Explain when self.up and self.down method is used?
How symbol is different from variables?
What are the data types in ruby?