Skip to content

Commit

Permalink
Remove redundant braces in a few uses of def_node_matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Apr 21, 2024
1 parent f1a748b commit 5706ac0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/lint/deprecated_class_methods.rb
Expand Up @@ -52,7 +52,7 @@ class DeprecatedClassMethods < Base
# @!method deprecated_class_method?(node)
def_node_matcher :deprecated_class_method?, <<~PATTERN
{
(send (const {cbase nil?} {:ENV}) {:clone :dup :freeze})
(send (const {cbase nil?} :ENV) {:clone :dup :freeze})
(send (const {cbase nil?} {:File :Dir}) :exists? _)
(send (const {cbase nil?} :Socket) {:gethostbyaddr :gethostbyname} ...)
(send nil? :attr _ boolean)
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/style/top_level_method_definition.rb
Expand Up @@ -77,7 +77,7 @@ def top_level_method_definition?(node)

# @!method define_method_block?(node)
def_node_matcher :define_method_block?, <<~PATTERN
({block numblock} (send _ {:define_method} _) ...)
({block numblock} (send _ :define_method _) ...)
PATTERN
end
end
Expand Down

0 comments on commit 5706ac0

Please sign in to comment.