From 8bb9d18313dce180ce8ecaa84d8df33a0db266b1 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Tue, 2 Feb 2010 18:01:00 +0100 Subject: [PATCH] SBDB::Env#[] --- lib/sbdb/environment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sbdb/environment.rb b/lib/sbdb/environment.rb index 7f3771b..fdb8191 100644 --- a/lib/sbdb/environment.rb +++ b/lib/sbdb/environment.rb @@ -80,8 +80,8 @@ module SBDB # it returns the old instance. # 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. - def [] file, name = nil, type = nil, &e - @dbs[ [file, name]] ||= (type || SBDB::Unkown).new file, name, nil, nil, nil, self, &e + def [] file, name = nil, type = nil, flags = nil, mode = nil, &e + @dbs[ [file, name, flags | CREATE]] ||= (type || SBDB::Unkown).new file, name, flags, mode, nil, self, &e end end Env = Environment