aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-04-03 15:56:40 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-04-03 15:57:01 -0700
commit3b378a7840c8c2a46935c73dc56d94d4b6fcee9e (patch)
treed5b627295e62be27555613315eb15a3941f9326e /activerecord/lib
parent3352e3b61035045bfed6f62b661cae4274127abc (diff)
downloadrails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.tar.gz
rails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.tar.bz2
rails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.zip
use File.binread to pull in the schema cache
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/railtie.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb
index ee3a6bf8c0..e94b67cbdc 100644
--- a/activerecord/lib/active_record/railtie.rb
+++ b/activerecord/lib/active_record/railtie.rb
@@ -115,7 +115,7 @@ module ActiveRecord
if app.config.use_schema_cache_dump
filename = File.join(app.config.paths["db"].first, "schema_cache.dump")
if File.file?(filename)
- cache = Marshal.load(open(filename, 'rb') { |f| f.read })
+ cache = Marshal.load File.binread filename
if cache.version == ActiveRecord::Migrator.current_version
ActiveRecord::Base.connection.schema_cache = cache
else