From 16863d903bcf550a99cf19646e7d056b68408c47 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Dec 2013 06:52:56 +0000 Subject: [PATCH] test_hash.rb: suppress warnings * test/ruby/test_hash.rb (test_rehash2, test_callcc_iter_level): suppress shadowing outer local variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_hash.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 169157bdfd..da4871eab9 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -788,7 +788,7 @@ class TestHash < Test::Unit::TestCase assert_equal("foobarbaz", h.default_proc.call("foo", "bar")) assert_nil(h.default_proc = nil) assert_nil(h.default_proc) - h.default_proc = ->(h, k){ true } + h.default_proc = ->(_,_){ true } assert_equal(true, h[:nope]) h = @cls[] assert_nil(h.default_proc) @@ -1013,7 +1013,7 @@ class TestHash < Test::Unit::TestCase assert_nothing_raised(RuntimeError, bug9105) do h=@cls[] cnt=0 - c = callcc {|c|c} + c = callcc {|cc|cc} h[cnt] = true h.each{|i| cnt+=1