lib/docparser/parser.rb in docparser-0.1.3 vs lib/docparser/parser.rb in docparser-0.1.4

- old
+ new

@@ -95,10 +95,15 @@ private def parallel_process(&block) @logger.info "Starting #{@num_processes} processes" - Parallel.map(@files, in_processes: @num_processes) do |file| + if defined?(RUBY_ENGINE) && RUBY_ENGINE != 'ruby' + options = { in_threads: @num_processes } + else + options = { in_processes: @num_processes } + end + Parallel.map(@files, options) do |file| # :nocov: # parse_doc(file, &block) # :nocov: # end.each do |result| result.each_with_index do |set, index| \ No newline at end of file