From: Daniel Berger Date: 2006-07-07T21:29:56+09:00 Subject: Re: Easy Pathname transfire@gmail.com wrote: > I find myself always using File.join, and never utilizing Pathname b/c > it's not as convenient to construct. This snippet occured to me to make > it more paletable: > > class String > def /(dir) > Pathname.new( File.join(self,dir) ) > end > end > > class Pathname > def /(dir) > join(dir) > end > end > > path = '' / 'usr' / 'local' #=> # > > Good idea? Improvements? Better alternatives? > > T. > > > > Think about MS Windows. Then think about UNC paths. Have fun. - Dan