What are freezing string in Ruby?
Answer / Sumit Kumar Gautam
Freezing a string in Ruby means making it immutable, which prevents modifications to the string's contents. In Ruby 1.8.7 and earlier versions, strings were mutable by default; however, in modern versions, all strings are frozen upon creation. To freeze a string, you can use the `freeze` method or assign the string to a constant.
| Is This Answer Correct ? | 0 Yes | 0 No |
Overview of ruby programming language?
How would you implement hash in ruby internally?
How to read a file in Ruby?
Tell me can you call a private method outside a ruby class using its object?
Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?
How is visibility of methods changed in ruby?
What is ruby methods?
What are the different environment variables present in the ruby?
Explain about the command line options?
List some features of ruby?
Mention what is the difference between procs and blocks?
What is ruby object?