summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-06-26 18:41:42 +0900
committeraycabta <aycabta@gmail.com>2019-06-26 18:44:27 +0900
commitba17127e992a4d1fb1fbd58869cbb4f12ff76227 (patch)
tree0506834fda42f8fed5c1fdce5f35afbddf72dc1a /lib
parent28eeaed8a9ec2557e8f8d42d8ab3e7cad310a8a9 (diff)
Decrease nesting level when closing token comes at a non-first token of line
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/ruby-lex.rb2
1 files changed, 2 insertions, 0 deletions
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