diff options
Diffstat (limited to 'ext/json/ext/parser/parser.c')
-rw-r--r-- | ext/json/ext/parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index d2e4eb6..3a9dc93 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1658,7 +1658,7 @@ case 7: if (json->symbolize_names && json->parsing_name) { *result = rb_str_intern(*result); - } else { + } else if (RB_TYPE_P(*result, T_STRING)) { rb_str_resize(*result, RSTRING_LEN(*result)); } if (cs >= JSON_string_first_final) { |