lib/picky/cores.rb in picky-0.11.2 vs lib/picky/cores.rb in picky-0.12.0

- old
+ new

@@ -13,9 +13,12 @@ # # Options include: # * max: Maximum # of processors to use. Default is all it can get. # def self.forked ary_or_generator, options = {} + return if ary_or_generator.empty? + raise "Block argument needed when running Cores.forked" unless block_given? + ary_or_generator = ary_or_generator.sort_by { rand } if options[:randomly] generator = ary_or_generator.each # Get the maximum number of processors. # \ No newline at end of file