RUBY-317
This commit is contained in:
parent
f00c0dfcf0
commit
8c241cded7
|
@ -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."
|
||||||
|
|
Loading…
Reference in New Issue