Skip to content

Commit

Permalink
Suppress warnings.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nurse committed Jan 18, 2012
1 parent 8cf0574 commit 8c6e0d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/ruby/test_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ def test_gets
w.close
end, proc do |r|
assert_equal("", r.gets(0))
assert_equal("foobarbaz", s = r.gets(9))
assert_equal("foobarbaz", r.gets(9))
end)
end

Expand Down Expand Up @@ -1772,7 +1772,7 @@ def test_threaded_flush
10.times.map do
Thread.start do
assert_in_out_err([], src) {|stdout, stderr|
assert_no_match(/hi.*hi/, stderr.join)
assert_no_match(/hi.*hi/, stderr.join, bug3585)
}
end
end.each {|th| th.join}
Expand Down Expand Up @@ -1832,11 +1832,11 @@ def test_each_line_limit_0
end

def test_advise
t = make_tempfile
assert_raise(ArgumentError, "no arguments") { t.advise }
tf = make_tempfile
assert_raise(ArgumentError, "no arguments") { tf.advise }
%w{normal random sequential willneed dontneed noreuse}.map(&:to_sym).each do |adv|
[[0,0], [0, 20], [400, 2]].each do |offset, len|
open(make_tempfile.path) do |t|
open(tf.path) do |t|
assert_equal(t.advise(adv, offset, len), nil)
assert_raise(ArgumentError, "superfluous arguments") do
t.advise(adv, offset, len, offset)
Expand All @@ -1860,10 +1860,10 @@ def test_advise

def test_invalid_advise
feature4204 = '[ruby-dev:42887]'
t = make_tempfile
tf = make_tempfile
%w{Normal rand glark will_need zzzzzzzzzzzz \u2609}.map(&:to_sym).each do |adv|
[[0,0], [0, 20], [400, 2]].each do |offset, len|
open(make_tempfile.path) do |t|
open(tf.path) do |t|
assert_raise(NotImplementedError, feature4204) { t.advise(adv, offset, len) }
end
end
Expand Down

0 comments on commit 8c6e0d3

Please sign in to comment.