Make a string immutable with Object's freeze method
greet = "Hello, myValue!" greet.freeze # try to append something greet.concat("!") # => TypeError: can't modify frozen string # is the object frozen? greet.frozen? # => true