7stud2
(7stud --)
4 July 2013 21:21
1
I'm confused.
On Windows7, Ruby 1.9.3
I do : ruby -S script.rb
and it works correctly, and searches the PATH variable
However, if I do :
set RUBYOPT=-S
ruby script.rb
=>ruby: invalid switch in RUBYOPT: -S (RuntimeError)
What am I missing ?
···
--
Posted via http://www.ruby-forum.com/ .
7stud2
(7stud --)
4 July 2013 21:32
2
Same behaviour on 1.8.6 on HPUX.
···
--
Posted via http://www.ruby-forum.com/ .
So, in ruby's man page, I see the following:
RUBYOPT Additional Ruby options.
e.g.
RUBYOPT="-w -Ke"
Note that RUBYOPT can contain only -d, -E, -I, -K, -r, -T, -U, -v, -w, -W, --debug,
--disable-FEATURE and --enable-FEATURE.
It doesn't look as though RUBYOPT works with -S
···
On Jul 4, 2013, at 4:21 PM, Tadeusz Bochan <lists@ruby-forum.com> wrote:
I'm confused.
On Windows7, Ruby 1.9.3
I do : ruby -S script.rb
and it works correctly, and searches the PATH variable
However, if I do :
set RUBYOPT=-S
ruby script.rb
=>ruby: invalid switch in RUBYOPT: -S (RuntimeError)
What am I missing ?
--
Posted via http://www.ruby-forum.com/\ .
7stud2
(7stud --)
5 July 2013 13:42
4
Thanks for that.
I managed to find that reference when I googled for an updated version
of the man pages. It was difficult to find unless you included "man
page" in the search.
In the Programming Ruby book, it only says that option -S (among others)
is not allowed if $SAFE >= 1
I guess that it makes sense not to have -S in a variable.
Regards
···
--
Posted via http://www.ruby-forum.com/ .