lib/rubocop/cop/rails/blank.rb in rubocop-rails-2.12.4 vs lib/rubocop/cop/rails/blank.rb in rubocop-rails-2.13.0

- old
+ new

@@ -4,17 +4,18 @@ module Cop module Rails # This cop checks for code that can be written with simpler conditionals # using `Object#blank?` defined by Active Support. # - # This cop is marked as unsafe auto-correction, because `' '.empty?` returns false, - # but `' '.blank?` returns true. Therefore, auto-correction is not compatible - # if the receiver is a non-empty blank string, tab, or newline meta characters. - # # Interaction with `Style/UnlessElse`: # The configuration of `NotPresent` will not produce an offense in the # context of `unless else` if `Style/UnlessElse` is inabled. This is # to prevent interference between the auto-correction of the two cops. + # + # @safety + # This cop is unsafe auto-correction, because `' '.empty?` returns false, + # but `' '.blank?` returns true. Therefore, auto-correction is not compatible + # if the receiver is a non-empty blank string, tab, or newline meta characters. # # @example NilOrEmpty: true (default) # # Converts usages of `nil? || empty?` to `blank?` # # # bad