lib/rubocop/cop/performance/bind_call.rb in rubocop-performance-1.9.2 vs lib/rubocop/cop/performance/bind_call.rb in rubocop-performance-1.10.0

- old
+ new

@@ -31,11 +31,11 @@ RESTRICT_ON_SEND = %i[call].freeze def_node_matcher :bind_with_call_method?, <<~PATTERN (send $(send - (send nil? _) :bind + _ :bind $(...)) :call $...) PATTERN def on_send(node) @@ -62,10 +62,10 @@ format(MSG, bind_arg: bind_arg, comma: comma, call_args: call_args) end def correction_range(receiver, node) location_of_bind = receiver.loc.selector.begin_pos - location_of_call = node.loc.end.end_pos + location_of_call = node.source_range.end.end_pos range_between(location_of_bind, location_of_call) end def build_call_args(call_args_node)