lib/rubocop/cop/rspec/multiple_memoized_helpers.rb in rubocop-rspec-2.31.0 vs lib/rubocop/cop/rspec/multiple_memoized_helpers.rb in rubocop-rspec-3.0.0.pre

- old
+ new

@@ -106,13 +106,11 @@ private attr_reader :example_group_memoized_helpers def all_helpers(node) - [ - *helpers(node), - *node.each_ancestor(:block).flat_map(&method(:helpers)) - ] + helpers(node) + + node.each_ancestor(:block).flat_map { |ancestor| helpers(ancestor) } end def helpers(node) @example_group_memoized_helpers[node] ||= variable_nodes(node).map do |variable_node|