ext/json/ext/parser/parser.rl in json_pure-2.0.2 vs ext/json/ext/parser/parser.rl in json_pure-2.0.3
- old
+ new
@@ -568,10 +568,10 @@
if (OBJ_FROZEN(source)) {
source = rb_str_dup(source);
}
FORCE_UTF8(source);
} else {
- source = rb_str_conv_enc(source, NULL, rb_utf8_encoding());
+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
}
#endif
return source;
}