Skip to content

Commit

Permalink
Check the end token of heredoc correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed May 30, 2019
1 parent 5a229b0 commit 55c34b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/irb/ruby-lex.rb
Expand Up @@ -147,6 +147,8 @@ def process_continue
return false
elsif !@tokens.empty? and @tokens.last[2] == "\\\n"
return true
elsif @tokens.size >= 1 and @tokens[-1][1] == :on_heredoc_end # "EOH\n"
return false
elsif @tokens.size >= 2 and @tokens[-2][3].anybits?(continued_bits)
# end of literal except for regexp
return true
Expand Down

0 comments on commit 55c34b9

Please sign in to comment.