Skip to content

Commit

Permalink
Treat "begin rescue end" correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Jun 12, 2019
1 parent c1d78a7 commit 8354cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/ruby-lex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8354cfd

Please sign in to comment.