We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f9e16d commit ef2552cCopy full SHA for ef2552c
ext/mysql2/client.c
@@ -586,7 +586,8 @@ static VALUE set_charset_name(VALUE self, VALUE value) {
586
#ifdef HAVE_RUBY_ENCODING_H
587
new_encoding = rb_funcall(cMysql2Client, intern_encoding_from_charset, 1, value);
588
if (new_encoding == Qnil) {
589
- rb_raise(cMysql2Error, "Unsupported charset: '%s'", RSTRING_PTR(value));
+ VALUE inspect = rb_inspect(value);
590
+ rb_raise(cMysql2Error, "Unsupported charset: '%s'", RSTRING_PTR(inspect));
591
} else {
592
if (wrapper->encoding == Qnil) {
593
wrapper->encoding = new_encoding;
0 commit comments