diff options
-rw-r--r-- | lib/irb/ruby-lex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 58a3e1e264..81024ea5bd 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -332,7 +332,7 @@ class RubyLex depth_difference = 0 @tokens.each_with_index do |t, index| case t[1] - when :on_ignored_nl, :on_nl + when :on_ignored_nl, :on_nl, :on_comment if index != (@tokens.size - 1) depth_difference = 0 end @@ -381,7 +381,7 @@ class RubyLex @tokens.each_with_index do |t, index| corresponding_token_depth = nil case t[1] - when :on_ignored_nl, :on_nl + when :on_ignored_nl, :on_nl, :on_comment spaces_at_line_head = 0 is_first_spaces_of_line = true is_first_printable_of_line = true |