make sure we create @encoding before setting encoding

This commit is contained in:
Brian Lopez 2010-07-21 13:17:32 -07:00
parent c614c89216
commit a878ba0272

View File

@ -8,8 +8,8 @@ module Mysql2
send(:"#{key}=", opts[key]) send(:"#{key}=", opts[key])
end end
# force the encoding to utf8 # force the encoding to utf8
self.charset_name = opts[:encoding] || 'utf8'
@encoding = nil @encoding = nil
self.charset_name = opts[:encoding] || 'utf8'
ssl_set(*opts.values_at(:sslkey, :sslcert, :sslca, :sslcapath, :sslciper)) ssl_set(*opts.values_at(:sslkey, :sslcert, :sslca, :sslcapath, :sslciper))