diff options
author | wycats <wycats@gmail.com> | 2010-05-17 19:42:00 +0400 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-05-17 19:42:00 +0400 |
commit | c3b7471c69b42132a5189013f1a8d7c7225a9127 (patch) | |
tree | 974a10e2747025c08183de2a411e1372a7580523 /actionpack/lib/action_view/template/handlers/erb.rb | |
parent | 80b60671f7216c571ea8711d1de8ca824aefbe54 (diff) | |
parent | 02c36cf5cb736a6c7321c8cb9a632a3a74344f25 (diff) | |
download | rails-c3b7471c69b42132a5189013f1a8d7c7225a9127.tar.gz rails-c3b7471c69b42132a5189013f1a8d7c7225a9127.tar.bz2 rails-c3b7471c69b42132a5189013f1a8d7c7225a9127.zip |
Merge branch 'encodings'
Diffstat (limited to 'actionpack/lib/action_view/template/handlers/erb.rb')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/erb.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/actionpack/lib/action_view/template/handlers/erb.rb index bbf012ab15..cbed0108cf 100644 --- a/actionpack/lib/action_view/template/handlers/erb.rb +++ b/actionpack/lib/action_view/template/handlers/erb.rb @@ -7,7 +7,7 @@ module ActionView class OutputBuffer < ActiveSupport::SafeBuffer def initialize(*) super - encode! + encode! if encoding_aware? end def <<(value) @@ -106,6 +106,8 @@ module ActionView if !encoding && (template.source.encoding == Encoding::BINARY) raise WrongEncodingError.new(template_source, Encoding.default_external) end + else + erb = template.source.dup end result = self.class.erb_implementation.new( |