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 |
How do the following methods differ: @my_string.strip and @my_string.strip! ?
Is ruby whitespace-dependent?
Are ruby strings are mutable?
Write the command to get installed Ruby version in your system?
Explain retry statement in ruby.
What is the difference between a statement and an expression in ruby?
what is the Notation used for denoting class variables in Ruby?
What is the difference between static and dynamic scaffolding?
What is the difference between extend and include?
Explain ruby strings.
What is the use of interpolation in ruby?
Tell us what is the difference between dynamic and static scaffolding?