On Nov 12, 6:39 pm, James Edward Gray II <ja... / grayproductions.net> wrote: > On Nov 12, 2007, at 5:30 PM, furtive.cl... / gmail.com wrote: > > >>>> file_name = File.basename(input.join.gsub(re, "_")) > > >>> Not if re has \A or \Z. > > >> If the Regexp contain such an anchor, we probably shouldn't be > >> calling gsub(). > > > We don't know what's in re, so we can't make a judgment about gsub. > > If you don't know the contents of the Regexp and thus you call gsub > (), you are a much braver programmer than I am! You've never used a Regexp variable? Always a Regexp literal for you? That's why I put a variable there, to make the point that it can't just be concatenated. > It's clear we just disagree and I've said my peace now. You win. ;) In my previous post, I did however make a valid argument with a valid example, to which you did not respond.