Skip to content

Commit

Permalink
[ruby/yarp] Fix backslash-r (CR) delimited strings
Browse files Browse the repository at this point in the history
now CR can be used as a string delimiter

ruby/prism@3d27bad797
  • Loading branch information
HParker authored and matzbot committed Aug 24, 2023
1 parent 791d572 commit 58ca0cf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Binary file modified test/yarp/fixtures/newline_terminated.txt
Binary file not shown.
31 changes: 22 additions & 9 deletions test/yarp/snapshots/newline_terminated.txt
@@ -1,13 +1,26 @@
ProgramNode(76...106)(
ProgramNode(76...212)(
[],
StatementsNode(76...106)(
[StringNode(76...82)((76...78), (78...81), (81...82), "foo"),
StringNode(83...90)((83...86), (86...89), (89...90), "foo"),
StringNode(91...98)((91...94), (94...97), (97...98), "foo"),
RegularExpressionNode(99...106)(
(99...102),
(102...105),
(105...106),
StatementsNode(76...212)(
[StringNode(76...82)((76...78), (78...81), (81...82), "abc"),
StringNode(84...90)((84...86), (86...89), (89...90), "abc"),
StringNode(92...98)((92...94), (94...97), (97...98), "abc"),
StringNode(100...106)((100...102), (102...105), (105...106), "abc"),
StringNode(108...114)((108...110), (110...113), (113...114), "abc"),
StringNode(116...122)((116...118), (118...121), (121...122), "abc"),
StringNode(124...130)((124...126), (126...129), (129...130), "abc"),
StringNode(132...139)((132...134), (134...138), (138...139), "\rabc"),
StringNode(142...149)((142...144), (144...148), (148...149), "\rabc"),
StringNode(151...157)((151...153), (153...156), (156...157), "abc"),
StringNode(159...165)((159...161), (161...164), (164...165), "abc"),
StringNode(167...173)((167...169), (169...172), (172...173), "abc"),
StringNode(175...181)((175...177), (177...180), (180...181), "abc"),
StringNode(182...188)((182...184), (184...187), (187...188), "foo"),
StringNode(189...196)((189...192), (192...195), (195...196), "foo"),
StringNode(197...204)((197...200), (200...203), (203...204), "foo"),
RegularExpressionNode(205...212)(
(205...208),
(208...211),
(211...212),
"foo",
0
)]
Expand Down

0 comments on commit 58ca0cf

Please sign in to comment.