From 55824a4823383978204f4adef4e0e0d2810a6491 Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Tue, 20 Jan 2009 15:55:48 -0500 Subject: [PATCH] nil check in ensure --- lib/mongo/mongo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/mongo.rb b/lib/mongo/mongo.rb index aff8b2f..618090d 100644 --- a/lib/mongo/mongo.rb +++ b/lib/mongo/mongo.rb @@ -102,7 +102,7 @@ module XGen raise "error retrieving database info" unless db.ok?(doc) doc ensure - db.close + db.close if db end end