diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-03 19:57:27 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-12-03 19:57:27 +0900 |
commit | df76eaa4f1619dfbc024235f444c602eb6d6775a (patch) | |
tree | d0cd9e760724c0867b8676a1b52e0fee01a932e8 /activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | |
parent | e7717ec7a09ca83f92a9819303f7a93e038a2679 (diff) | |
download | rails-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/sqlite3_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index 1bec8fbabd..615aa0d83e 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -209,7 +209,8 @@ module ActiveRecord # DATABASE STATEMENTS ====================================== #++ - READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp.call(:select) # :nodoc: + READ_QUERY = ActiveRecord::ConnectionAdapters::AbstractAdapter.build_read_query_regexp(:select) # :nodoc: + private_constant :READ_QUERY def write_query?(sql) # :nodoc: !READ_QUERY.match?(sql) |