Skip to content

Conversation

@yahonda
Copy link
Collaborator

@yahonda yahonda commented Feb 26, 2022

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
$

Related to rails/rails#44555

```ruby
$ 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 koic merged commit f0521e2 into rsim:master Feb 26, 2022
@koic
Copy link
Collaborator

koic commented Feb 26, 2022

Thank you!

@yahonda yahonda deleted the enable_style_map_to_hash_cop branch February 26, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants