frozen string literal ruby code example
Example 1: frozen string literal ruby
# frozen_string_literal: true
class Foo
# ...
end
Example 2: ruby frozen_string_literal
# frozen_string_literal: true
"".frozen?
=> true
(+"").frozen?
=> false
"".dup.frozen?
=> false