diff options
-rw-r--r-- | ext/json/ext/parser/parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index 5b2e61c..ea95e71 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1632,6 +1632,8 @@ case 7: if (json->symbolize_names && json->parsing_name) { *result = rb_str_intern(*result); + } else { + rb_str_resize(*result, RSTRING_LEN(*result)); } if (cs >= JSON_string_first_final) { return p + 1; |