def filter(config, index)
if config.filters.empty?
index.procedures
else
require 'set' # Add this require statement
config.filters.inject(Set.new){|s, f| s | index.procedures.select(&f) }
end
end
Seems that some versions of Ruby have this already loaded, others don't. Glad you caught this. Please put this change in lib/piggly.rb instead, submit a pull request and I'll close the issue. Thanks!
Missing require 'set' in the else clause below.
in /piggly/lib/piggly/command/base.rb:69
@return [Enumerable]
def filter(config, index) if config.filters.empty? index.procedures else require 'set' # Add this require statement config.filters.inject(Set.new){|s, f| s | index.procedures.select(&f) } end end