------art_14285_11004934.1145931724473
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On 4/24/06, Ryan Leavengood <leavengood / gmail.com> wrote:
>
> On 4/24/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
> >
> > 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.
>
> Hmmm, OK. Then why does setting RUBYOPT to just rubygems work (it has
> no dash?) That doesn't work on the command-line (at least on Windows):
>
> C:\_Ryan\ruby_installer\svn\NSIS>ruby rubygems -e 'puts "hello"'
> ruby: No such file or directory -- rubygems (LoadError)
>
> C:\_Ryan\ruby_installer\svn\NSIS>ruby -rubygems -e 'puts "hello"'
> hello
>
> Maybe to be safe I should always just add -rubygems (i.e with a dash
> prefix.)
>
> Ryan


I only recently discovered this myself... with a single option you can omit
the "-", but with multiple, the "-" is required.

Curt

------art_14285_11004934.1145931724473--