ed31a0caa8 (master): [ruby/prism] Correctly handle line continuations in %w/i% interrupted by heredocs

0 views
Skip to first unread message

Earlopain

unread,
1:24 PM (6 hours ago) 1:24 PM
to ruby...@g.ruby-lang.org
Earlopain 2025-12-03 08:05:13 +0000 (Wed, 03 Dec 2025)

New Revision: ed31a0caa8

https://github.com/ruby/ruby/commit/ed31a0caa8

Log:
[ruby/prism] Correctly handle line continuations in %w/i% interrupted by heredocs

See https://bugs.ruby-lang.org/issues/21756. Ripper fails to parse this,
but prism actually also doesn't handle it correctly.

When heredocs are used, even in lowercase percent arays there can be
multiple `STRING_CONTENT` tokens. We need to concat them.

Luckily we don't need to handle as many cases as in uppercase arrays where interpolation is allowed.

https://github.com/ruby/prism/commit/211677000e

Modified files:
prism/prism.c
Reply all
Reply to author
Forward
0 new messages