What does ruby name refers to?
Answer / Gourab Kumar
To freeze an object in Ruby, you can use the Object#freeze method. Freezing an object makes it immutable and prevents any modifications to its properties. Here's a simple example: obj = {}.freeze; obj[:key] = 'value'; raises an error because obj is frozen.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is ruby object?
Explain the difference between a single quote and double quote?
Do you know about dig, float and max?
Is ruby a strongly typed or a weakly typed language?
How to open a file in Ruby?
How does ruby deal with extremely large numbers?
What are the key features of ruby?
What is the use of load and require in ruby?
How is visibility of methods changed in ruby?
Tell me what is the difference between ruby 1.9 and ruby 2.0?
Mention what is the command to create a migration?
In how many ways items can be removed from array in Ruby?