On Sunday 02 January 2005 11:31 pm, nobu.nokada / softhome.net wrote:
> Hi,
>
> At Mon, 3 Jan 2005 12:34:50 +0900,
>
> Jim Weirich wrote in [ruby-talk:125009]:
> > On Sunday 02 January 2005 09:51 pm, nobu.nokada / softhome.net wrote:
> > > Anyway, testrb would better to take -I flags.
> > >
> > > +          o.on('-I', "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]",
> > > +               "Appends directory list to $LOAD_PATH.") do |dirs|
> > > +            $LOAD_PATH.concat(dirs.split(File::PATH_SEPARATOR))
> > > +          end
> >
> > Actually, for it to be useful to Rake, the list of directories must be
> > put at the front of the list (as the Ruby command does), not at the end
> > of the list (as the example does).
>
> So, it should be
>   $LOAD_PATH.unshift(*dirs.split(File::PATH_SEPARATOR))
> ?

Yes, that would work.

-- 
-- Jim Weirich    jim / weirichhouse.org     http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct, 
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)