Skip to content
Permalink
Browse files

Treat "begin rescue end" correctly

  • Loading branch information...
aycabta committed Jun 12, 2019
1 parent c1d78a7 commit 8354cfd03b1e9961266e1fe56fca481450679b98
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/irb/ruby-lex.rb
@@ -250,7 +250,7 @@ def process_nesting_level
case t[2]
when 'def', 'do', 'case', 'for', 'begin', 'class', 'module'
indent += 1
when 'if', 'unless', 'while', 'until', 'rescue'
when 'if', 'unless', 'while', 'until'
# postfix if/unless/while/until/rescue must be Ripper::EXPR_LABEL
indent += 1 unless t[3].allbits?(Ripper::EXPR_LABEL)
when 'end'

0 comments on commit 8354cfd

Please sign in to comment.
You can’t perform that action at this time.