ext/oj/compat.c in oj-3.13.2 vs ext/oj/compat.c in oj-3.13.3
- old
+ new
@@ -28,11 +28,10 @@
if (Qundef == rkey) {
if (Yes != pi->options.cache_keys) {
if (Yes == pi->options.sym_key) {
rkey = ID2SYM(rb_intern3(key, klen, oj_utf8_encoding));
} else {
- rkey = rb_str_new(key, klen);
- rkey = oj_encode(rkey);
+ rkey = rb_utf8_str_new(key, klen);
}
} else if (Yes == pi->options.sym_key) {
rkey = oj_sym_intern(key, klen);
} else {
rkey = oj_str_intern(key, klen);