1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/matrix.rb: suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-01-25 22:08:29 +00:00
parent 7123baaf14
commit a967f738c8
9 changed files with 46 additions and 34 deletions

View file

@ -38,10 +38,14 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_warning
save_rubyopt = ENV['RUBYOPT']
ENV['RUBYOPT'] = nil
assert_in_out_err(%w(-W0 -e) + ['p $-W'], "", %w(0), [])
assert_in_out_err(%w(-W1 -e) + ['p $-W'], "", %w(1), [])
assert_in_out_err(%w(-Wx -e) + ['p $-W'], "", %w(1), [])
assert_in_out_err(%w(-W -e) + ['p $-W'], "", %w(2), [])
ensure
ENV['RUBYOPT'] = save_rubyopt
end
def test_safe_level
@ -271,7 +275,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_sflag
assert_in_out_err(%w(- -abc -def=foo -ghi-jkl -- -xyz),
"#!ruby -s\np [$abc, $def, $ghi_jkl, $xyz]\n",
"#!ruby -s\np [$abc, $def, $ghi_jkl, defined?($xyz)]\n",
['[true, "foo", true, nil]'], [])
assert_in_out_err(%w(- -#), "#!ruby -s\n", [],