rubocop / rubocop-ast

RuboCop's AST extensions and NodePattern functionality
https://docs.rubocop.org/rubocop-ast
MIT License
112 stars 53 forks source link

Lift the deprecation from `ArrayNode#each_value` #301

Closed koic closed 5 months ago

koic commented 5 months ago

This PR lifts the deprecation from ArrayNode#each_value for the following reasons:

  1. HashNode#each_value and HashNode#each_key are not deprecated.
  1. node.values.each is recommended by Style/HashEachMethods cop to be replaced with each_value instead of values.each. And node.each_value do |value| is clearer in intent than node.children.each do |value|.

Since it is a soft deprecation in documentation only, it has not been added to the changelog.

marcandre commented 5 months ago

You are right, thank you ❤️