mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Don't freeze generated code
This seems a root cause for https://github.com/haml/haml/pull/929.
This commit is contained in:
parent
49fdd7fcb9
commit
05b5385e31
2 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue