summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-25 23:12:50 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-25 23:12:50 +0000
commit37679ee584e409088a2f083594e3c4ccba486e13 (patch)
treeea8390a11414859640d50b21293a2190d99f73ce /test/ruby/test_hash.rb
parenta967f738c83b960f23f5b04403a17ca37f049e25 (diff)
supress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index d03783129f..5c9b08b917 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -51,7 +51,7 @@ class TestHash < Test::Unit::TestCase
assert_equal([], x[22])
assert_not_same(x[22], x[22])
- x = Hash.new{|h,k| z = k; h[k] = k*2}
+ x = Hash.new{|h,kk| z = kk; h[kk] = kk*2}
z = 0
assert_equal(44, x[22])
assert_equal(22, z)
@@ -703,14 +703,14 @@ class TestHash < Test::Unit::TestCase
end
def test_default_proc
- h = Hash.new {|h, k| h + k + "baz" }
+ h = Hash.new {|hh, k| hh + k + "baz" }
assert_equal("foobarbaz", h.default_proc.call("foo", "bar"))
h = {}
assert_nil(h.default_proc)
end
def test_shift2
- h = Hash.new {|h, k| :foo }
+ h = Hash.new {|hh, k| :foo }
h[1] = 2
assert_equal([1, 2], h.shift)
assert_equal(:foo, h.shift)