From a878ba027227d7f80add9a429ea7609d6b647c70 Mon Sep 17 00:00:00 2001 From: Brian Lopez Date: Wed, 21 Jul 2010 13:17:32 -0700 Subject: [PATCH] make sure we create @encoding before setting encoding --- lib/mysql2/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mysql2/client.rb b/lib/mysql2/client.rb index 95dd6e4..d80bb89 100644 --- a/lib/mysql2/client.rb +++ b/lib/mysql2/client.rb @@ -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))