diff options
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/schema_cache.rb | 10 | ||||
-rw-r--r-- | activerecord/test/cases/connection_adapters/schema_cache_test.rb | 16 |
2 files changed, 0 insertions, 26 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/schema_cache.rb b/activerecord/lib/active_record/connection_adapters/schema_cache.rb index 2653e3c74e..69b7a6e690 100644 --- a/activerecord/lib/active_record/connection_adapters/schema_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/schema_cache.rb @@ -103,16 +103,6 @@ module ActiveRecord @data_sources.delete name end - def marshal_dump - # if we get current version during initialization, it happens stack over flow. - @version = connection.migration_context.current_version - [@version, @columns, @columns_hash, @primary_keys, @data_sources] - end - - def marshal_load(array) - @version, @columns, @columns_hash, @primary_keys, @data_sources = array - end - private def prepare_data_sources diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 727cab77f5..79067c0f8a 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -66,22 +66,6 @@ module ActiveRecord assert_equal 0, @cache.size end - def test_dump_and_load - @cache.columns("posts") - @cache.columns_hash("posts") - @cache.data_sources("posts") - @cache.primary_keys("posts") - - @cache = Marshal.load(Marshal.dump(@cache)) - - assert_no_queries do - assert_equal 12, @cache.columns("posts").size - assert_equal 12, @cache.columns_hash("posts").size - assert @cache.data_sources("posts") - assert_equal "id", @cache.primary_keys("posts") - end - end - def test_data_source_exist assert @cache.data_source_exists?("posts") assert_not @cache.data_source_exists?("foo") |