Hi!

Derek Smith schrieb:
>> puts stats.sort {|x,y| x[1] <=> y[1]}.max
>> 
>> This explicitly sorts by the 2nd value in the to_a array, which is the 
>> mtime.
> 
> Thanks, but that does not work because its sorting on the time only, for 
> example sorting on 1052, 1054, 110, 1042.
> 
> [...]
>     DB_BKUP1.each do |dbfile|
>         stats[dbfile] = [File.stat(dbfile).mtime.to_i]
>     end
> [...]

Why do you convert the mtime (a Time object) to an integer? Time
objects are comparable. Try to omit the ".to_i" and compare the
Time objects that represent the mtimes.

Regards,
Daniel