summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y10
1 files changed, 10 insertions, 0 deletions
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