Modifying frozen objects will raise an error in runtime.
Also, using pragma-like comment
# frozen_string_literal: true
will trigger all String objects in the given file to be frozen and thus immutable.