From 80a44efb689acd73983adfa2c2a6dee816192d50 Mon Sep 17 00:00:00 2001 From: Wojciech Piekutowski Date: Sun, 20 Feb 2011 17:15:35 +0100 Subject: [PATCH] Prevent outer local variable shadowing --- test/collection_test.rb | 4 ++-- test/cursor_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/collection_test.rb b/test/collection_test.rb index f137679..6ae748d 100644 --- a/test/collection_test.rb +++ b/test/collection_test.rb @@ -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 diff --git a/test/cursor_test.rb b/test/cursor_test.rb index e7ae52d..a91f964 100644 --- a/test/cursor_test.rb +++ b/test/cursor_test.rb @@ -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