1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[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

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;
}