Commit 1846a8a
committed
Add forward-ref alias regression test for trailing-comment RHS
Codex flagged a ripper-only path where Constant#is_alias_for_path stays
nil for +Foo = Bar # comment+: parse_constant_body's on_const branch
only fires create_module_alias when the const token is followed by
on_nl/EOF, so the trailing comment short-circuits the recording. Pre-PR
this was masked by Constant#find_alias_for's lookup-time regex on
+value+, which this PR removes.
Skip the actual fix -- the ripper parser is on its way out (loads with
a deprecation banner, opt-in via RDOC_USE_RIPPER_PARSER=1) and isn't
worth a backstop. Keep the test in the shared parser-mixin
(RDocParserPrismTestCases) so prism is still guarded against the same
shape, and omit it under the legacy ripper variant.1 parent 3e0ca4e commit 1846a8a
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1715 | 1715 | | |
1716 | 1716 | | |
1717 | 1717 | | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1718 | 1736 | | |
1719 | 1737 | | |
1720 | 1738 | | |
| |||
0 commit comments