Skip to content

Commit

Permalink
Don't freeze generated code
Browse files Browse the repository at this point in the history
This seems a root cause for #929.
  • Loading branch information
k0kubun committed May 18, 2017
1 parent 49fdd7f commit 05b5385
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 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.
Expand Down
2 changes: 1 addition & 1 deletion lib/haml/temple_engine.rb
Expand Up @@ -49,7 +49,7 @@ def compile(template)
# @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

Expand Down

0 comments on commit 05b5385

Please sign in to comment.