From: Peter Szinek Date: 2006-05-10T15:25:18+09:00 Subject: Re: non-static way to get the filename? > I'm confused. You're saying File.basename(file) is *too verbose*? Or > have I misunderstood? > > You can't get much more terse than File.basename without getting cryptic > imho. Well, for me file.basename is not cryptic. Maybe for someone it is... However, consider this snippet: 1) File.copy(File.join(INPUTDIR,File.basename(f)), File.join(OUTPUTDIR,File.basename(f)) For me it is too verbose, i would like to see something along the lines of 2) File.copy(INPUTDIR, f.basename, OUTPUTDIR, f.basename) (semantics: File.join the 1st param with the 2nd and the 3rd with the 4th and copy joined_1 to joined_2). or even 3) File.copy(File.join(INPUTDIR, f.basename), File.join(OUTPUTDIR, f.basename)) would be better, Which example do you find more readable? Is 2) too cryptic for you? Well i have to say that coming from Java (or even Python - i am coming from both) there are *far more* cryptic things in Ruby than any code snippet in this thread. Cheers, Peter