Florian Gross wrote: > > def files_equal?(*files) > files.map do |file| > File.size file > end.uniq.size <= 1 and > files.map do |file| > File.read file > end.uniq.size <= 1 > end > Could anybody please explain the "end.uniq.size" line? Thanks! Greetings, Andreas > This ought to be slightly faster in the average case. > > Other optimizations would be reading the files line-wise in parallel and > bailing out as soon as one of the lines differs. >