We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bab5ad commit 33831c9Copy full SHA for 33831c9
lib/ruby_lexer.rb
@@ -138,7 +138,6 @@ def heredoc here # 63 lines
138
end
139
140
until src.check(eos_re) do
141
- src.skip(eos_re)
142
c = tokadd_string func, "\n", nil
143
144
rb_compile_error err_msg if
@@ -200,12 +199,10 @@ def heredoc_identifier # 51 lines
200
199
return nil
201
202
203
- if src.check(/.*\n/) then
+ if src.scan(/.*\n/) then
204
# TODO: think about storing off the char range instead
205
- line = src.string[src.pos, src.matched_size]
206
- src.string[src.pos, src.matched_size] = "\n"
+ line = src.matched
207
src.extra_lines_added += 1
208
- src.pos += 1
209
else
210
line = nil
211
0 commit comments