Project

General

Profile

« Previous | Next » 

Revision 926857eb

Added by mdalessio (Mike Dalessio) almost 2 years ago

[ruby/yarp] fix: support newline-terminated regular expressions

Previously, parsing a snippet like this:

%r\nfoo\n

would result in tracking the second newline twice, resulting in a
failed runtime assertion.

Fixing that issue reveals another bug, which is that the first
newline was not being tracked at all. So we introduce a call to
yp_newline_list right when we construct the REGEXP_BEGIN token.

https://github.com/ruby/yarp/commit/0d5d759091