lib/file_scanner/worker.rb in file_scanner-2.0.2 vs lib/file_scanner/worker.rb in file_scanner-2.0.3
- old
+ new
@@ -23,11 +23,12 @@
@slice = slice.to_i
@logger = logger
end
def call
+ return slices unless block_given?
slices.each do |slice|
- yield(slice, @logger) if block_given?
+ yield(slice, @logger)
end
rescue StandardError => e
@logger.error { e.message }
raise e
end