diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-04-03 15:56:40 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-04-03 15:57:01 -0700 |
commit | 3b378a7840c8c2a46935c73dc56d94d4b6fcee9e (patch) | |
tree | d5b627295e62be27555613315eb15a3941f9326e /activerecord | |
parent | 3352e3b61035045bfed6f62b661cae4274127abc (diff) | |
download | rails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.tar.gz rails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.tar.bz2 rails-3b378a7840c8c2a46935c73dc56d94d4b6fcee9e.zip |
use File.binread to pull in the schema cache
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 2 |
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 |