lib/rubocop/cop/style/and_or.rb in rubocop-1.30.0 vs lib/rubocop/cop/style/and_or.rb in rubocop-1.30.1
- old
+ new
@@ -10,34 +10,34 @@
# @safety
# 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
+ # @example EnforcedStyle: conditionals (default)
# # bad
- # foo.save and return
- #
- # # bad
# if foo and bar
# end
#
# # good
# foo.save && return
#
# # good
+ # foo.save and return
+ #
+ # # good
# if foo && bar
# end
#
- # @example EnforcedStyle: conditionals (default)
+ # @example EnforcedStyle: always
# # bad
+ # foo.save and return
+ #
+ # # bad
# if foo and bar
# end
#
# # good
# foo.save && return
- #
- # # good
- # foo.save and return
#
# # good
# if foo && bar
# end
class AndOr < Base