ruby-changes:32278
From: nobu <ko1@a...>
Date: Mon, 23 Dec 2013 15:53:02 +0900 (JST)
Subject: [ruby-changes:32278] nobu:r44357 (trunk): test_hash.rb: suppress warnings
nobu 2013-12-23 15:52:56 +0900 (Mon, 23 Dec 2013) New Revision: 44357 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44357 Log: test_hash.rb: suppress warnings * test/ruby/test_hash.rb (test_rehash2, test_callcc_iter_level): suppress shadowing outer local variable warnings. Modified files: trunk/test/ruby/test_hash.rb Index: test/ruby/test_hash.rb =================================================================== --- test/ruby/test_hash.rb (revision 44356) +++ test/ruby/test_hash.rb (revision 44357) @@ -788,7 +788,7 @@ class TestHash < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_hash.rb#L788 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 https://github.com/ruby/ruby/blob/trunk/test/ruby/test_hash.rb#L1013 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/