lib/rubocop/cop/style/and_or.rb in rubocop-1.29.1 vs lib/rubocop/cop/style/and_or.rb in rubocop-1.30.0
- old
+ new
@@ -1,16 +1,16 @@
# frozen_string_literal: true
module RuboCop
module Cop
module Style
- # This cop checks for uses of `and` and `or`, and suggests using `&&` and
+ # Checks for uses of `and` and `or`, and suggests using `&&` and
# `||` instead. It can be configured to check only in conditions or in
# all contexts.
#
# @safety
- # Auto-correction is unsafe because there is a different operator precedence
+ # Autocorrection is unsafe because there is a different operator precedence
# between logical operators (`&&` and `||`) and semantic operators (`and` and `or`),
# and that might change the behavior.
#
# @example EnforcedStyle: always
# # bad
@@ -109,10 +109,10 @@
corrector.insert_before(node.receiver, '(')
corrector.insert_after(node.last_argument, ')')
end
# ! is a special case:
- # 'x and !obj.method arg' can be auto-corrected if we
+ # 'x and !obj.method arg' can be autocorrected if we
# recurse down a level and add parens to 'obj.method arg'
# however, 'not x' also parses as (send x :!)
def correct_not(node, receiver, corrector)
if node.prefix_bang?
return unless receiver.send_type?