From 09de7c91707b83a6c6ff8ab1a176cc1bf92ebb4d Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 30 Sep 2018 15:24:17 +0900 Subject: [PATCH] Use private attr_reader in Arel No longer needed workaround for Ruby 2.2 "private attribute?" warning. Related 6d63b5e49a399fe246afcebad45c3c962de268fa. --- activerecord/lib/arel/collectors/composite.rb | 3 +-- activerecord/lib/arel/collectors/substitute_binds.rb | 3 +-- activerecord/lib/arel/table.rb | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/activerecord/lib/arel/collectors/composite.rb b/activerecord/lib/arel/collectors/composite.rb index d040d8598d..0533544993 100644 --- a/activerecord/lib/arel/collectors/composite.rb +++ b/activerecord/lib/arel/collectors/composite.rb @@ -24,8 +24,7 @@ def value [left.value, right.value] end - protected - + private attr_reader :left, :right end end diff --git a/activerecord/lib/arel/collectors/substitute_binds.rb b/activerecord/lib/arel/collectors/substitute_binds.rb index 3f40eec8a8..4b894bc4b1 100644 --- a/activerecord/lib/arel/collectors/substitute_binds.rb +++ b/activerecord/lib/arel/collectors/substitute_binds.rb @@ -21,8 +21,7 @@ def value delegate.value end - protected - + private attr_reader :quoter, :delegate end end diff --git a/activerecord/lib/arel/table.rb b/activerecord/lib/arel/table.rb index 686fcdf962..c40c68715a 100644 --- a/activerecord/lib/arel/table.rb +++ b/activerecord/lib/arel/table.rb @@ -104,8 +104,7 @@ def able_to_type_cast? !type_caster.nil? end - protected - + private attr_reader :type_caster end end -- GitLab