use new close method for disconnecting where we can

This commit is contained in:
Brian Lopez 2010-05-12 22:09:06 -07:00
parent e01c7581e5
commit 5b41082aba
2 changed files with 3 additions and 1 deletions

View File

@ -243,10 +243,12 @@ module ActiveRecord
end
def disconnect!
@connection.close
@connection = nil
end
def reset!
disconnect!
@connection = Mysql2::Client.new(@config)
end

View File

@ -150,7 +150,7 @@ module Sequel
# Closes given database connection.
def disconnect_connection(c)
c = nil
c.close
end
# Convert tinyint(1) type to boolean if convert_tinyint_to_bool is true