aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-08 19:51:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-08 19:51:41 -0700
commit0155bf4021e34c70b3b88eaf75ce41e1140fe474 (patch)
treed75f9b1d4ddea79b8730df5cb4d1921aa1ea5783 /actionpack
parent681bf1fc481883293a47def022267577224e53b8 (diff)
downloadrails-0155bf4021e34c70b3b88eaf75ce41e1140fe474.tar.gz
rails-0155bf4021e34c70b3b88eaf75ce41e1140fe474.tar.bz2
rails-0155bf4021e34c70b3b88eaf75ce41e1140fe474.zip
use binread to read the files
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/template/resolver.rb3
1 files changed, 2 insertions, 1 deletions
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))