Avoid use of numeric indexing on SQLite3::ResultSet::HashWithTypesAndFields

This commit is contained in:
Akinori MUSHA 2022-05-25 15:37:48 +09:00
parent d12449a983
commit 060eb44497

View file

@ -136,7 +136,7 @@ class HTTP::CookieJar
# Returns the schema version of the database. # Returns the schema version of the database.
def schema_version def schema_version
@schema_version ||= @db.execute("PRAGMA user_version").first[0] @schema_version ||= @db.execute("PRAGMA user_version").first["user_version"]
rescue SQLite3::SQLException rescue SQLite3::SQLException
@logger.warn "couldn't get schema version!" if @logger @logger.warn "couldn't get schema version!" if @logger
return nil return nil