lib/rubocop/cop/style/and_or.rb in rubocop-0.48.1 vs lib/rubocop/cop/style/and_or.rb in rubocop-0.49.0
- old
+ new
@@ -106,10 +106,10 @@
corrector.insert_before(node.source_range, '(')
corrector.insert_after(node.source_range, ')')
end
def correctable_send?(node)
- !node.parenthesized? && node.arguments?
+ !node.parenthesized? && !node.method?(:[]) && node.arguments?
end
def whitespace_before_arg(node)
begin_paren = node.loc.selector.end_pos
end_paren = begin_paren