SBDB::Unknown: Blocks are nice
This commit is contained in:
parent
d723a228a0
commit
02791744a6
|
@ -77,11 +77,7 @@ module SBDB
|
||||||
|
|
||||||
class Unknown < DB
|
class Unknown < DB
|
||||||
def self.new file, name, *p, &e
|
def self.new file, name, *p, &e
|
||||||
db = super file, name, UNKNOWN, *p[2..-1]
|
db = super( file, name, UNKNOWN, *p) { db.bdb_object.get_type }
|
||||||
dbt = begin
|
|
||||||
db.bdb_object.get_type
|
|
||||||
ensure db.close
|
|
||||||
end
|
|
||||||
TYPES[dbt] ? TYPES[dbt].new( file, name, *p, &e) : super( file, name, UNKNOWN, *p, &e)
|
TYPES[dbt] ? TYPES[dbt].new( file, name, *p, &e) : super( file, name, UNKNOWN, *p, &e)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue