summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-26 15:01:01 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-26 15:01:01 +0900
commitfe0ddf0e58e65ab3ae3d6e73382c3bebcd4541e5 (patch)
tree1f101eb745882d4e9a09d5dcb76d3e7889aecb02 /lib
parent6df1814c08df93bbc0b3e7a73649bcf82e126064 (diff)
downloadruby-fe0ddf0e58e65ab3ae3d6e73382c3bebcd4541e5.tar.gz
`ensure` is not a continuos line
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/ruby-lex.rb2
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