diff options
Diffstat (limited to 'ext/json/ext/parser.rl')
-rw-r--r-- | ext/json/ext/parser.rl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/ext/parser.rl b/ext/json/ext/parser.rl index 6e196cf..6a581ec 100644 --- a/ext/json/ext/parser.rl +++ b/ext/json/ext/parser.rl @@ -373,6 +373,7 @@ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *resul return p + 1; } else { rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + return NULL; } } @@ -702,6 +703,7 @@ static VALUE cParser_parse(VALUE self) return result; } else { rb_raise(eParserError, "%u: unexpected token at '%s'", __LINE__, p); + return Qnil; } } |