From ba17127e992a4d1fb1fbd58869cbb4f12ff76227 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 26 Jun 2019 18:41:42 +0900 Subject: [PATCH] Decrease nesting level when closing token comes at a non-first token of line --- lib/irb/ruby-lex.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 53fc65667f..8164fd2a17 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -366,6 +366,7 @@ class RubyLex if is_first_printable_of_line corresponding_token_depth = spaces_of_nest.pop else + spaces_of_nest.pop corresponding_token_depth = nil end when :on_kw @@ -383,6 +384,7 @@ class RubyLex if is_first_printable_of_line corresponding_token_depth = spaces_of_nest.pop else + spaces_of_nest.pop corresponding_token_depth = nil end end