Skip to content

Fix Violations of and Reenable Style/HashAsLastArrayItem - #51498

Merged
Hamms merged 1 commit into
stagingfrom
fix-Style/HashAsLastArrayItem
Apr 25, 2023
Merged

Fix Violations of and Reenable Style/HashAsLastArrayItem#51498
Hamms merged 1 commit into
stagingfrom
fix-Style/HashAsLastArrayItem

Conversation

@Hamms

@Hamms Hamms commented Apr 24, 2023

Copy link
Copy Markdown
Contributor

Checks for presence or absence of braces around hash literal as a last array item depending on configuration.

This feels particularly relevant as we prepare for an update to Ruby 3.0, in which implicit hashes as the last argument of a method call was deprecated.

Fix applied automatically with bundle exec rubocop --auto-correct-all --only Style/HashAsLastArrayItem

Links

> Checks for presence or absence of braces around hash literal as a last array item depending on configuration.

This feels particularly relevant as we prepare for an update to Ruby 3.0, in which [implicit hashes as the last argument of a method call was deprecated.](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)

Fix applied automatically with `bundle exec rubocop --auto-correct-all --only Style/HashAsLastArrayItem`

- https://docs.rubocop.org/rubocop/cops_style.html#stylehashaslastarrayitem
- https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashAsLastArrayItem
@Hamms Hamms added code-hygiene Ruby Update Everything related to work to update the version of Ruby our codebase runs on labels Apr 24, 2023
@Hamms
Hamms marked this pull request as ready for review April 25, 2023 00:31
@Hamms
Hamms requested review from a team April 25, 2023 00:31
@Hamms
Hamms merged commit 960e2e5 into staging Apr 25, 2023
@Hamms
Hamms deleted the fix-Style/HashAsLastArrayItem branch April 25, 2023 17:39
@Hamms Hamms mentioned this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-hygiene Ruby Update Everything related to work to update the version of Ruby our codebase runs on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants