Answer Posted / 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 |
Post New Answer View All Answers