aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-12-03 19:57:27 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-12-03 19:57:27 +0900
commitdf76eaa4f1619dfbc024235f444c602eb6d6775a (patch)
treed0cd9e760724c0867b8676a1b52e0fee01a932e8 /activerecord/lib/active_record/connection_adapters/postgresql
parente7717ec7a09ca83f92a9819303f7a93e038a2679 (diff)
downloadrails-df76eaa4f1619dfbc024235f444c602eb6d6775a.tar.gz
rails-df76eaa4f1619dfbc024235f444c602eb6d6775a.tar.bz2
rails-df76eaa4f1619dfbc024235f444c602eb6d6775a.zip
Address "warning: shadowing outer local variable - parts"
And hide the `READ_QUERY` internal constant.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
index c8bc339e61..2d5b592639 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
@@ -67,7 +67,8 @@ module ActiveRecord
end
end
- READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp.call(:select, :show, :set) # :nodoc:
+ READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp(:select, :show, :set) # :nodoc:
+ private_constant :READ_QUERY
def write_query?(sql) # :nodoc:
!READ_QUERY.match?(sql)