[ruby/racc] Return `nil` for all syntax errors

https://github.com/ruby/racc/commit/51817ce0f6
This commit is contained in:
Marc-Andre Lafortune 2020-07-21 23:47:23 -04:00
parent 1b1ea7b3bc
commit 352895b751
1 changed files with 1 additions and 1 deletions

View File

@ -605,7 +605,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume)
user_yyerror:
if (v->errstatus == 3) {
if (v->t == vFINAL_TOKEN) {
v->retval = Qfalse;
v->retval = Qnil;
v->fin = CP_FIN_EOT;
return;
}