diff options
author | aycabta <aycabta@gmail.com> | 2019-06-12 11:00:25 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-12 11:00:25 +0900 |
commit | 8354cfd03b1e9961266e1fe56fca481450679b98 (patch) | |
tree | 86245ae4be0a6ddb4345ce7a51011fbb564d29a8 /lib/irb/ruby-lex.rb | |
parent | c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf (diff) | |
download | ruby-8354cfd03b1e9961266e1fe56fca481450679b98.tar.gz |
Treat "begin rescue end" correctly
Diffstat (limited to 'lib/irb/ruby-lex.rb')
-rw-r--r-- | lib/irb/ruby-lex.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 5e8f3235d6..d77354fb83 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -250,7 +250,7 @@ class RubyLex 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' |