From: "nikolai.weibull@..." Date: 2007-08-14T20:40:07+09:00 Subject: Re: Does an Array#apply make any sense at all? On Aug 14, 11:50 am, Eric Hodel wrote: > On Aug 14, 2007, at 02:40, nikolai.weib...@gmail.com wrote: > > > I wanted to write a simple method for comparing two paths on a Windows > > system. > > Is there something wrong with Pathname#==? Yes, not that it can't be fixed, but the current definition is sort of broken (on all systems): # # Compare this pathname with +other+. The comparison is string- based. # Be aware that two different paths (foo.txt and ./ foo.txt) # can refer to the same file. # def ==(other) return false unless Pathname === other other.to_s == @path end alias === == alias eql? == nikolai