ruby-changes:62435
From: Marc-Andre <ko1@a...>
Date: Thu, 30 Jul 2020 23:07:46 +0900 (JST)
Subject: [ruby-changes:62435] 352895b751 (master): [ruby/racc] Return `nil` for all syntax errors
https://git.ruby-lang.org/ruby.git/commit/?id=352895b751 From 352895b7511d26b40023549b6eb6e06a243c9bbd Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune <github@m...> Date: Tue, 21 Jul 2020 23:47:23 -0400 Subject: [ruby/racc] Return `nil` for all syntax errors https://github.com/ruby/racc/commit/51817ce0f6 diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index ca74b80..4d77bbf 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -605,7 +605,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume) https://github.com/ruby/ruby/blob/trunk/ext/racc/cparse/cparse.c#L605 user_yyerror: if (v->errstatus == 3) { if (v->t == vFINAL_TOKEN) { - v->retval = Qfalse; + v->retval = Qnil; v->fin = CP_FIN_EOT; return; } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/