On Tue, 25 Apr 2006, Ryan Leavengood wrote:

> Hello all,
>
> I'm working on fixing the remaining installer problems in the
> One-Click Installer so we can finally release it, and one of those
> involves the manipulation of the RUBYOPT environment variable. On that
> note, I was wondering the format of that. If there are multiple
> entrys, how are they formatted? Just spaces in between?
>
> In other words, if I am to add rubygems as a new option while
> preserving the older options, what would I do? Just add it with a
> space prefix at the end of RUBYOPT?
>
> In my testing there seemed to be cases when RUBYOPT was not read and I
> also got errors sometimes, so I want to ensure I don't break someone's
> system by setting an invalid RUBYOPT.
>
> Thanks,
> Ryan

if you look in ruby.c you'll see that it's literally parsed as part of the
commandline - except only the switchs 'IdvwrK' and 'T' are accepted.  it looks
like it is indeed space separated.

   harp:~ > cat rubylib/a.rb
   A=42

   harp:~ > RUBYOPT="-ryaml -Irubylib/ -ra" ruby -e "p [YAML, A]"
   [YAML, 42]

seems to work.

cheers.

-a
-- 
be kind whenever possible... it is always possible.
- h.h. the 14th dali lama