From: Luis Lavena Date: 2009-11-05T07:08:18+09:00 Subject: [ruby-core:26543] Re: [Bug #2336] pathname compare fails in windows On Wed, Nov 4, 2009 at 6:59 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ruby-core:26540] [Bug #2336] pathname compare fails in windows" > � �on Thu, 5 Nov 2009 04:48:46 +0900, Roger Pack writes: > > |>> Pathname.new('c:/').relative_path_from Pathname.new('/') > |ArgumentError: different prefix: "c:/" and "/" > > Could you tell me what did you expect from above code? > For me, Windows ignorant, the error seems natural consequence from > #relative_path_from. > Even Pathname2 [1], which was conceived as more Windows-friendly version fails with the same error The problem is that '/' should be considering the same drive unit as C:/, or should be considering the current one? (Dir.pwd) [1] http://rubyforge.org/projects/shards/ -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry