mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 22:45:03 +02:00
ruby.c: command line option over RUBYOPT env
* ruby.c (proc_options): -W command line option should be able to override -w in RUBYOPT environment variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b6b1038c6b
commit
66fe2c0dd9
3 changed files with 17 additions and 2 deletions
|
@ -258,6 +258,10 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
assert_equal([], e)
|
||||
end
|
||||
|
||||
ENV['RUBYOPT'] = '-w'
|
||||
assert_in_out_err(%w(), "p $VERBOSE", ["true"])
|
||||
assert_in_out_err(%w(-W1), "p $VERBOSE", ["false"])
|
||||
assert_in_out_err(%w(-W0), "p $VERBOSE", ["nil"])
|
||||
ensure
|
||||
if rubyopt_orig
|
||||
ENV['RUBYOPT'] = rubyopt_orig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue