diff options
Diffstat (limited to 'ext/ripper')
-rw-r--r-- | ext/ripper/lib/ripper/lexer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index bb5908025d..22f18ff429 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -98,7 +98,7 @@ class Ripper ignored_sp = [] heredoc = @buf.last heredoc.each_with_index do |e, i| - if Elem === e and e.event == :on_tstring_content + if Elem === e and e.event == :on_tstring_content and e.pos[1].zero? tok = e.tok.dup if w > 0 and /\A\s/ =~ e.tok if (n = dedent_string(e.tok, w)) > 0 if e.tok.empty? |