Ok, that makes more sense. Turns out I was upsetting Ruby’s
scoping/aliasing. Eventually I got an error “Can’t modify frozen
string”, which tipped me off. Now I have:
ARGV.each do |file|
path = file.dup # copy to tweak
zip.each do |suf, cmd|
if path.sub!(%r{\.#{suf}$}, '')
And everything works ok. Seems like a loop w/i a loop thing? Anyways,
thanks for the sub!() ptr.
-Nate
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.