From 13a27771b0e0c6df77bf85b42d9c8cada48f368e Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Thu, 2 Dec 2010 11:24:21 -0500 Subject: [PATCH] minor: ensure_index fix for 1.9.1 --- lib/mongo/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index a7ee5b0..e17b177 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -450,7 +450,7 @@ module Mongo generate_indexes(valid, name, opts) if valid.any? # Reset the cache here in case there are any errors inserting. Best to be safe. - name.each {|n| @cache[n] = now + @cache_time} + @cache[name] = now + @cache_time name end