From: Ara.T.Howard@... Date: 2004-10-09T11:54:44+09:00 Subject: Re: ARGV || something On Sat, 9 Oct 2004, Bil Kleb wrote: > Hello. > > I used to do this with VERSION < 1.8, > > components = ARGV || %w[ Adjoint Design FUN3D_90 GetGrad > GridMove HRefine LibF90 Mixed Party > PHYSICS_MODULES Rad ] > > It no longer works for VERSION == 1.8.2-p2. > > What's going on and what is the idiom now? > > I went through Why's 1.8 guide, but nothing slapped me. i can't figure that it ever would have worked? jib:~ > /usr/bin/ruby -v ruby 1.6.8 (2002-12-24) [i386-linux-gnu] jib:~ > /usr/bin/ruby -e'p(ARGV || 42)' [] jib:~ > /usr/bin/ruby -e'p(ARGV || 42)' 42 ["42"] jib:~ > /usr/bin/ruby -e'p(ARGV)' [] even in 1.6.8 ARGV is an Array, and so always true? you have code that gives default arguments like this? regards -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================