File: parallel_map_complex_objects.rb

package info (click to toggle)
ruby-parallel 1.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 476 kB
  • sloc: ruby: 1,998; makefile: 4
file content (9 lines) | stat: -rw-r--r-- 264 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true
require './spec/cases/helper'

object = ["\nasd#{File.read('Gemfile')}--#{File.read('Rakefile')}" * 100, 12_345, { b: :a }]

result = Parallel.map([1, 2]) do |_x|
  object
end
print 'YES' if result.inspect == [object, object].inspect