From 0155bf4021e34c70b3b88eaf75ce41e1140fe474 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Mon, 8 Aug 2011 19:51:41 -0700
Subject: use binread to read the files

---
 actionpack/lib/action_view/template/resolver.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'actionpack/lib')

diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb
index 5f7fe81bd5..eea869e7a0 100644
--- a/actionpack/lib/action_view/template/resolver.rb
+++ b/actionpack/lib/action_view/template/resolver.rb
@@ -1,5 +1,6 @@
 require "pathname"
 require "active_support/core_ext/class"
+require "active_support/core_ext/io"
 require "action_view/template"
 
 module ActionView
@@ -137,7 +138,7 @@ module ActionView
         next if File.directory?(p) || !sanitizer[p].include?(p)
 
         handler, format = extract_handler_and_format(p, formats)
-        contents = File.open(p, "rb") { |io| io.read }
+        contents = File.binread p
 
         templates << Template.new(contents, File.expand_path(p), handler,
           :virtual_path => path.virtual, :format => format, :updated_at => mtime(p))
-- 
cgit v1.2.3