diff --git a/lib/sbdb/db.rb b/lib/sbdb/db.rb index 3f7d1aa..0852f1b 100644 --- a/lib/sbdb/db.rb +++ b/lib/sbdb/db.rb @@ -77,11 +77,7 @@ module SBDB class Unknown < DB def self.new file, name, *p, &e - db = super file, name, UNKNOWN, *p[2..-1] - dbt = begin - db.bdb_object.get_type - ensure db.close - end + db = super( file, name, UNKNOWN, *p) { db.bdb_object.get_type } TYPES[dbt] ? TYPES[dbt].new( file, name, *p, &e) : super( file, name, UNKNOWN, *p, &e) end end