diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-26 15:01:01 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-06-26 15:01:01 +0900 |
commit | fe0ddf0e58e65ab3ae3d6e73382c3bebcd4541e5 (patch) | |
tree | 1f101eb745882d4e9a09d5dcb76d3e7889aecb02 /lib | |
parent | 6df1814c08df93bbc0b3e7a73649bcf82e126064 (diff) | |
download | ruby-fe0ddf0e58e65ab3ae3d6e73382c3bebcd4541e5.tar.gz |
`ensure` is not a continuos line
Diffstat (limited to 'lib')
-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 f8127b7bd2..53fc65667f 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -175,7 +175,7 @@ class RubyLex return false elsif @tokens.size >= 2 and @tokens[-2][1] == :on_semicolon return false - elsif @tokens.size >= 2 and @tokens[-2][1] == :on_kw and (@tokens[-2][2] == 'begin' or @tokens[-2][2] == 'else') + elsif @tokens.size >= 2 and @tokens[-2][1] == :on_kw and ['begin', 'else', 'ensure'].include?(@tokens[-2][2]) return false elsif @tokens.size >= 3 and @tokens[-3][1] == :on_symbeg and @tokens[-2][1] == :on_ivar # This is for :@a or :@1 because :@1 ends with EXPR_FNAME |