rsim / oracle-enhanced

Oracle enhaced adapter for ActiveRecord
MIT License
547 stars 309 forks source link

Enable `Style/MapToHash` cop #2266

Closed yahonda closed 2 years ago

yahonda commented 2 years ago

Related to rails/rails#44555

$ bundle exec rubocop -A
Inspecting 72 files
.......C................................................................

Offenses:

lib/active_record/connection_adapters/oracle_enhanced/connection.rb:104:37: C: [Corrected] Style/MapToHash: Pass a block to to_h instead of calling map.to_h.
            columns.each_with_index.map { |x, i| [x, row[i]] }.to_h if row
                                    ^^^

72 files inspected, 1 offense detected, 1 offense corrected
$
koic commented 2 years ago

Thank you!