summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 06:52:56 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 06:52:56 +0000
commit16863d903bcf550a99cf19646e7d056b68408c47 (patch)
tree6e7242d4cc28c1c898a0550279178cda608b3a23 /test
parent3a18a62d4488c470892d1daac446755bb590536a (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_hash.rb4
1 files 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