0 votes
in Ruby by
What are freezing string in Ruby.

1 Answer

0 votes
by

In most programming languages strings are immutable. It means that an existing string can't be modified, only a new string can be created out of them.

In Ruby, by default strings are not immutable. To make them immutable, freeze method can be used.

...