lib/rubocop/cop/rails/index_by.rb in rubocop-rails-2.13.0 vs lib/rubocop/cop/rails/index_by.rb in rubocop-rails-2.13.1

- old
+ new

@@ -21,36 +21,36 @@ include IndexMethod extend AutoCorrector def_node_matcher :on_bad_each_with_object, <<~PATTERN (block - ({send csend} _ :each_with_object (hash)) + (call _ :each_with_object (hash)) (args (arg $_el) (arg _memo)) - ({send csend} (lvar _memo) :[]= $!`_memo (lvar _el))) + (call (lvar _memo) :[]= $!`_memo (lvar _el))) PATTERN def_node_matcher :on_bad_to_h, <<~PATTERN (block - ({send csend} _ :to_h) + (call _ :to_h) (args (arg $_el)) (array $_ (lvar _el))) PATTERN def_node_matcher :on_bad_map_to_h, <<~PATTERN - ({send csend} + (call (block - ({send csend} _ {:map :collect}) + (call _ {:map :collect}) (args (arg $_el)) (array $_ (lvar _el))) :to_h) PATTERN def_node_matcher :on_bad_hash_brackets_map, <<~PATTERN (send (const _ :Hash) :[] (block - ({send csend} _ {:map :collect}) + (call _ {:map :collect}) (args (arg $_el)) (array $_ (lvar _el)))) PATTERN private