From: Luis Lavena Date: 2010-12-22T08:52:29+09:00 Subject: Re: FileTest.relative? On Dec 21, 8:35 pm, Intransition wrote: > It seems FileTest lacks a `relative?` method (and conversely `absolute? > `). I need such a method. I went to write one but found my self not > 100% certain about it being cross-platform. I wrote: > >   module FileTest >     module_function > >     def relative?(path) >       /\A[\/\\]/ !~ File.expand_path(path) >     end >   end > > > Is all that really necessary? My version may be too simplistic, but > surely there is more concise way to do this? Your code is not contemplating drive letters. -- Luis Lavena