Prevent outer local variable shadowing

This commit is contained in:
Wojciech Piekutowski 2011-02-20 17:15:35 +01:00
parent 2971793b48
commit 80a44efb68
2 changed files with 4 additions and 4 deletions

View File

@ -373,8 +373,8 @@ class TestCollection < Test::Unit::TestCase
docs = [{"hello" => "world"}, {"hello" => "world"}]
@@test.insert(docs)
docs.each do |doc|
assert(doc.include?(:_id))
docs.each do |d|
assert(d.include?(:_id))
end
end

View File

@ -171,8 +171,8 @@ class CursorTest < Test::Unit::TestCase
cursor = Cursor.new(@@coll, :timeout => false)
assert_equal false, cursor.timeout
@@coll.find({}, :timeout => false) do |cursor|
assert_equal false, cursor.timeout
@@coll.find({}, :timeout => false) do |c|
assert_equal false, c.timeout
end
end