From 2a4b6ed37cbb7acb622703be4db770457c2b72cc Mon Sep 17 00:00:00 2001 From: yui-knk Date: Fri, 16 Feb 2024 17:33:39 +0900 Subject: Workaround for `Prism::ParseTest#test_filepath` for "unparser/corpus/literal/def.txt" See the discussion on https://github.com/ruby/ruby/pull/9923 --- parse.y | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 8ca4d78eae..284395ed7b 100644 --- a/parse.y +++ b/parse.y @@ -9412,7 +9412,17 @@ formal_argument(struct parser_params *p, ID id) #undef ERR } shadowing_lvar(p, id); + +/* + * Workaround for Prism::ParseTest#test_filepath for "unparser/corpus/literal/def.txt" + * + * See the discussion on https://github.com/ruby/ruby/pull/9923 + */ +#ifndef RIPPER return id; +#else + return 0; +#endif } #ifdef RIPPER -- cgit v1.2.3