lib/rubocop/rspec/language.rb in rubocop-rspec-1.43.2 vs lib/rubocop/rspec/language.rb in rubocop-rspec-1.44.0

- old
+ new

@@ -5,11 +5,12 @@ # RSpec public API methods that are commonly used in cops module Language # Set of method selectors class SelectorSet def initialize(selectors) - @selectors = selectors + @selectors = selectors.freeze + freeze end def ==(other) selectors.eql?(other.selectors) end @@ -46,9 +47,13 @@ "{#{node_pattern}}" end def node_pattern selectors.map(&:inspect).join(' ') + end + + def to_a + selectors end protected attr_reader :selectors