Skip to content

Commit 33831c9

Browse files
committed
Removed some code that didn't actually do anything. (Confusion)
[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 6743]
1 parent 6bab5ad commit 33831c9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/ruby_lexer.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def heredoc here # 63 lines
138138
end
139139

140140
until src.check(eos_re) do
141-
src.skip(eos_re)
142141
c = tokadd_string func, "\n", nil
143142

144143
rb_compile_error err_msg if
@@ -200,12 +199,10 @@ def heredoc_identifier # 51 lines
200199
return nil
201200
end
202201

203-
if src.check(/.*\n/) then
202+
if src.scan(/.*\n/) then
204203
# 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"
204+
line = src.matched
207205
src.extra_lines_added += 1
208-
src.pos += 1
209206
else
210207
line = nil
211208
end

0 commit comments

Comments
 (0)