I am trying to log the average running time of 10 threads by using the inject method but it\'s giving me this error:
undefined method `+\' for #
You didn't provide an initial value for sum in
threads.inject() { |sum, e| sum + e.value}.to_f / threads.size
Fix it with
threads.inject(0) { |sum, e| sum + e.value}.to_f / threads.size