diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-29 10:12:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-29 10:12:48 +0000 |
commit | 2ef405ce24739a1f23d9215446a10d44d606b5f8 (patch) | |
tree | b8d4477b36f117be59a5c5a14ba505d0437b255b /test | |
parent | c367128d2749e502ea903381c9322b3c227a04f6 (diff) | |
download | ruby-2ef405ce24739a1f23d9215446a10d44d606b5f8.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 72672292b7..95d60d9933 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -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 |