lib/rubocop/cop/cop.rb in rubocop-1.65.0 vs lib/rubocop/cop/cop.rb in rubocop-1.65.1
- old
+ new
@@ -68,11 +68,11 @@
# Since this range may be generated from Ruby code embedded in some
# template file, we convert it to location info in the original file.
range = range_for_original(range)
- if block.nil? && !support_autocorrect?
+ if block.nil? && !self.class.support_autocorrect?
super(range, message: message, severity: severity)
else
super(range, message: message, severity: severity) do |corrector|
emulate_v0_callsequence(corrector, &block)
end
@@ -152,10 +152,10 @@
suppress_clobbering { lambda.call(corrector) }
end
def correction_lambda
- return unless support_autocorrect?
+ return unless self.class.support_autocorrect?
dedupe_on_node(@v0_argument) { autocorrect(@v0_argument) }
end
def dedupe_on_node(node)