зеркало из https://github.com/github/ruby.git
abce8583e2
The problem was that we were treating heredoc bodies as part of the %W list because we didn't push the scanning cursor past the heredoc after lexing out the here doc. To fix this, we changed the whitespace scanning function to quit scanning when it reaches a newline but only in the case that a heredoc is present. Additionally, we need to prevent double counting newlines in the case of a heredoc. For example: ```ruby %W(<<foo 123) foo ``` The newline after the `)` is counted as part of scanning the heredoc, so we added logic to prevent double counting the newline when scanning the rest of the %W list. https://github.com/ruby/yarp/commit/eb090d8126 Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com> |
||
---|---|---|
.. | ||
yp_buffer.c | ||
yp_buffer.h | ||
yp_char.c | ||
yp_char.h | ||
yp_constant_pool.c | ||
yp_constant_pool.h | ||
yp_list.c | ||
yp_list.h | ||
yp_memchr.c | ||
yp_memchr.h | ||
yp_newline_list.c | ||
yp_newline_list.h | ||
yp_state_stack.c | ||
yp_state_stack.h | ||
yp_string.c | ||
yp_string.h | ||
yp_string_list.c | ||
yp_string_list.h | ||
yp_strncasecmp.c | ||
yp_strpbrk.c | ||
yp_strpbrk.h |