Where is the result?

Hi
Interesting thing:

require 'benchmark'
arr=[3,2,1]
erg=[]
Benchmark.bm do |r|
  r.report { arr.sort! }
  erg=arr[0..5] ## I know...
end
print erg

Why is erg not sorted??

Berg

I get a sorted array, so please double check whether
you really used the posted code.

···

Am 22.04.2016 um 18:31 schrieb A Berger:

Interesting thing:

require 'benchmark'
arr=[3,2,1]
erg=
Benchmark.bm do |r|
  r.report { arr.sort! }
  erg=arr[0..5] ## I know...
end
print erg

Why is erg not sorted??

--
GitHub: stomar (Marcus Stollsteimer) · GitHub
PGP: 0x6B3A101A

Ok, change .bm to .bmbm
I really thought that wouldn't make a difference. We' re getting closer to
this bug!

Thx Berg