SBDB::Env#[]

This commit is contained in:
Denis Knauf 2010-02-02 18:01:00 +01:00
parent b9d22ea98c
commit 8bb9d18313

View file

@ -80,8 +80,8 @@ module SBDB
# it returns the old instance. # it returns the old instance.
# If you use this, never use close. It's possible somebody else use it too. # If you use this, never use close. It's possible somebody else use it too.
# The Databases, which are opened, will close, if the Environment will close. # The Databases, which are opened, will close, if the Environment will close.
def [] file, name = nil, type = nil, &e def [] file, name = nil, type = nil, flags = nil, mode = nil, &e
@dbs[ [file, name]] ||= (type || SBDB::Unkown).new file, name, nil, nil, nil, self, &e @dbs[ [file, name, flags | CREATE]] ||= (type || SBDB::Unkown).new file, name, flags, mode, nil, self, &e
end end
end end
Env = Environment Env = Environment