From: Robert Klemme Date: 2009-05-14T04:40:06+09:00 Subject: Re: Question on redefining the File.join mechanism On 13.05.2009 08:31, RichardOnRails wrote: > Now I see that you've reduced the matter to Array#join, so I could > simple write: > > ['foo', 'bar'].join '\\' # => foo\bar, Exactly. > but wrapping in a 3-liner like yours probably simplifies invocation. > I'll think about it some more. Your 3-liner looks like one more "best > practice", which site I just visited. > > Thanks for education in Ruby elegance. You're welcome! Just another remark: it's been a while that I used the Windows version of Ruby (I work mostly on cygwin and Linux) but as far as I remember if you need those file names only internally (i.e. in the Ruby program) then the regular File.join will do as you can use forward and backward slashes. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/