This commit is contained in:
Kyle Banker 2011-08-29 11:22:55 -04:00
parent f00c0dfcf0
commit 8c241cded7
1 changed files with 2 additions and 1 deletions

View File

@ -269,7 +269,8 @@ module Mongo
# #
# @return [Mongo::Collection] # @return [Mongo::Collection]
def create_collection(name, opts={}) def create_collection(name, opts={})
if collection_names.include?(name.to_s) name = name.to_s
if collection_names.include?(name)
if strict? if strict?
raise MongoDBError, "Collection #{name} already exists. " + raise MongoDBError, "Collection #{name} already exists. " +
"Currently in strict mode." "Currently in strict mode."