Escaped newlines in single-quoted heredocs
Opened this issue · 0 comments
kddnewton commented
In the following snippet:
<<~'FOO'
baz\\
qux
FOO
For Ruby you will get:
$ ruby --dump=insns test/tmp/test.rb
== disasm: #<ISeq:<main>@test/tmp/test.rb:1 (1,0)-(1,8)> (catch: false)
0000 putstring "baz\\\\\nqux\n" ( 1)[Li]
0002 leave
but for parser you get:
$ bin/ruby-parse test/tmp/test.rb
(dstr
(str "baz\\\n")
(str "qux\n"))