From: Robert Klemme Date: 2009-09-09T21:15:42+09:00 Subject: Re: different results with File.exists? 2009/9/9 David A. Black : > Hi -- > > On Tue, 8 Sep 2009, Robert Klemme wrote: > >> 2009/9/8 Mehdi Karamnejad : >>> >>> yeah,that was it! thanks ;) >> >> Additional hint: use p to debug output what you have. e.g. >> >> path=gets >> p path >> if File.exists?(path) then > > Meta-additional hint: in 1.9, p returns its argument(s), so if you > have: > >  path = gets > > you can just change it to: > >  p path = gets > > which makes for slightly easier back-and-forth between the p version > and the non-p version. David, did you rather mean "path = p gets"? Because "p path = gets" does work in pre 1.9 already. :-) Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/