From 2e0050ce5cd36c563d1d8b6b5cb761c8d34a51af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 20 Dec 2011 11:06:37 +0100 Subject: Do not hard code encoding to UTF8 --- actionpack/lib/action_view/template/error.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'actionpack/lib/action_view/template') diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb index ee74bb47d3..587e37a84f 100644 --- a/actionpack/lib/action_view/template/error.rb +++ b/actionpack/lib/action_view/template/error.rb @@ -89,14 +89,10 @@ module ActionView line_counter = start_on_line return unless source_code = source_code[start_on_line..end_on_line] - extract = source_code.sum do |line| + source_code.sum do |line| line_counter += 1 "#{indent}#{line_counter}: #{line}\n" end - - extract.force_encoding("UTF-8") if extract.respond_to?(:encode!) - - extract end def sub_template_of(template_path) -- cgit v1.2.3