diff --git a/.rubocop.yml b/.rubocop.yml index 956be1c8e..63ab76606 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -132,6 +132,9 @@ Style/FrozenStringLiteralComment: Enabled: true EnforcedStyle: always +Style/MapToHash: + Enabled: true + Style/RedundantFreeze: Enabled: true diff --git a/lib/active_record/connection_adapters/oracle_enhanced/connection.rb b/lib/active_record/connection_adapters/oracle_enhanced/connection.rb index 17179964e..8af7f8b38 100644 --- a/lib/active_record/connection_adapters/oracle_enhanced/connection.rb +++ b/lib/active_record/connection_adapters/oracle_enhanced/connection.rb @@ -101,7 +101,7 @@ def _select_one(arel, name = nil, binds = []) _oracle_downcase(col_name) end row = cursor.fetch - columns.each_with_index.map { |x, i| [x, row[i]] }.to_h if row + columns.each_with_index.to_h { |x, i| [x, row[i]] } if row ensure cursor.close end