Prevent outer local variable shadowing
This commit is contained in:
parent
2971793b48
commit
80a44efb68
|
@ -373,8 +373,8 @@ class TestCollection < Test::Unit::TestCase
|
||||||
|
|
||||||
docs = [{"hello" => "world"}, {"hello" => "world"}]
|
docs = [{"hello" => "world"}, {"hello" => "world"}]
|
||||||
@@test.insert(docs)
|
@@test.insert(docs)
|
||||||
docs.each do |doc|
|
docs.each do |d|
|
||||||
assert(doc.include?(:_id))
|
assert(d.include?(:_id))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -171,8 +171,8 @@ class CursorTest < Test::Unit::TestCase
|
||||||
cursor = Cursor.new(@@coll, :timeout => false)
|
cursor = Cursor.new(@@coll, :timeout => false)
|
||||||
assert_equal false, cursor.timeout
|
assert_equal false, cursor.timeout
|
||||||
|
|
||||||
@@coll.find({}, :timeout => false) do |cursor|
|
@@coll.find({}, :timeout => false) do |c|
|
||||||
assert_equal false, cursor.timeout
|
assert_equal false, c.timeout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue