From 56278a7a1e2efcf080259459f4f0ab40f29b1fca Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sat, 17 Feb 2018 21:10:32 +0200 Subject: [PATCH] Partly revert 1e526788e6b1d3f42f4d8fdca20e588d42838c80 Some attr_readers should be `protected` instead of `private` See https://travis-ci.org/rails/rails/builds/342800276 --- actionpack/lib/action_dispatch/http/mime_type.rb | 5 ++++- .../lib/active_record/type/adapter_specific_registry.rb | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 1d3d241f66..295539281f 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -279,9 +279,12 @@ module Mime def all?; false; end - private + protected + attr_reader :string, :synonyms + private + def to_ary; end def to_a; end diff --git a/activerecord/lib/active_record/type/adapter_specific_registry.rb b/activerecord/lib/active_record/type/adapter_specific_registry.rb index 357cf862c8..b300fdfa05 100644 --- a/activerecord/lib/active_record/type/adapter_specific_registry.rb +++ b/activerecord/lib/active_record/type/adapter_specific_registry.rb @@ -53,6 +53,9 @@ module ActiveRecord end protected + + attr_reader :name, :block, :adapter, :override + def priority result = 0 if adapter @@ -69,7 +72,6 @@ module ActiveRecord end private - attr_reader :name, :block, :adapter, :override def matches_adapter?(adapter: nil, **) (self.adapter.nil? || adapter == self.adapter)