summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-18 07:02:58 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-18 07:02:58 +0000
commit8c6e0d3007ad6cba3674dd4bc2259f17696f1887 (patch)
treea5b7426672d2f6fd593940eb7bdceeefc581be0d /test
parent8cf05741bc4d94ba2b0aa53d876738b7fd5fc747 (diff)
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c89e8ace30..81b8e4aeab 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -1057,7 +1057,7 @@ class TestIO < Test::Unit::TestCase
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
@@ -1772,7 +1772,7 @@ End
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}
@@ -1832,11 +1832,11 @@ End
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)
@@ -1860,10 +1860,10 @@ End
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