ensure is not a continuos line

This commit is contained in:
Nobuyoshi Nakada 2019-06-26 15:01:01 +09:00
parent 6df1814c08
commit fe0ddf0e58
No known key found for this signature in database
GPG Key ID: 4BC7D6DF58D8DF60

View File

@ -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