lib/rubocop/cop/style/expand_path_arguments.rb in rubocop-0.86.0 vs lib/rubocop/cop/style/expand_path_arguments.rb in rubocop-0.87.0
- old
+ new
@@ -51,11 +51,11 @@
'instead of ' \
'`Pathname.new(__FILE__).parent.expand_path`.'
def_node_matcher :file_expand_path, <<~PATTERN
(send
- (const nil? :File) :expand_path
+ (const {nil? cbase} :File) :expand_path
$_
$_)
PATTERN
def_node_matcher :pathname_parent_expand_path, <<~PATTERN
@@ -67,10 +67,10 @@
def_node_matcher :pathname_new_parent_expand_path, <<~PATTERN
(send
(send
(send
- (const nil? :Pathname) :new
+ (const {nil? cbase} :Pathname) :new
$_) :parent) :expand_path)
PATTERN
def on_send(node)
if (captured_values = file_expand_path(node))