Skip to content

Commit 01fdcbb

Browse files
committed
Remove redundant method call in def_node_matcher
1 parent a80d92b commit 01fdcbb

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/rubocop/cop/style/redundant_fetch_block.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class RedundantFetchBlock < Base
4949
(block
5050
$(call _ :fetch _)
5151
(args)
52-
${nil? #basic_literal? #const_type?})
52+
${nil? basic_literal? const_type?})
5353
PATTERN
5454

5555
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
@@ -71,14 +71,6 @@ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
7171

7272
private
7373

74-
def basic_literal?(node)
75-
node&.basic_literal?
76-
end
77-
78-
def const_type?(node)
79-
node&.const_type?
80-
end
81-
8274
def should_not_check?(send, body)
8375
(body&.const_type? && !check_for_constant?) ||
8476
(body&.str_type? && !check_for_string?) ||

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy