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
1 changed files with 1 additions and 1 deletions

View File

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