Brian Candler wrote in post #979745:
>
>
> (1) auto-splat to avoid the [2] magic index
>
> outer_array.each do |mtime, name, hexdigest|
>
> (2) Use a hash, rather than an array, to record ones you've processed.
> This avoids a linear search on every iteration
>
> seen = {}
> outer_array.each do |mtime, name, hexdigest|
>   next if seen[hexdigest]
>   seen[hexdigest] = true
>   ...
> end

Very nice. Thank you.

-- 
Posted via http://www.ruby-forum.com/.