diff --git a/lib/haml/generator.rb b/lib/haml/generator.rb index 19df4a21..0dadf023 100644 --- a/lib/haml/generator.rb +++ b/lib/haml/generator.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: true +# frozen_string_literal: false module Haml # Ruby code generator, which is a limited version of Temple::Generator. # Limit methods since Haml doesn't need most of them. diff --git a/lib/haml/temple_engine.rb b/lib/haml/temple_engine.rb index c34f0d8f..1c7928f0 100644 --- a/lib/haml/temple_engine.rb +++ b/lib/haml/temple_engine.rb @@ -49,7 +49,7 @@ module Haml # @return [String] def precompiled encoding = Encoding.find(@encoding || '') - return @precompiled.force_encoding(encoding) if encoding == Encoding::ASCII_8BIT && !@precompiled.frozen? + return @precompiled.force_encoding(encoding) if encoding == Encoding::ASCII_8BIT return @precompiled.encode(encoding) end