summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-06-27 16:03:43 +0900
committeraycabta <aycabta@gmail.com>2019-06-27 16:03:43 +0900
commit2fd03fd7e651d5f0bf78e315eafdde5468c1de53 (patch)
tree054a0461bfb401aaa721f5019207c52a2ba6ced3 /lib
parent097554855c1a9404f3220bcc5c1906cc62399b59 (diff)
EXPR_LABEL also indicates non-continuation line
Example: [ 1, # this is not continuation line 2 ]
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 6f8076c261..af839c7aa2 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -308,7 +308,7 @@ class RubyLex
def check_newline_depth_difference
depth_difference = 0
- if @tokens.size >= 2 and @tokens.last[2].end_with?("\n") and @tokens[-2][3].nobits?(Ripper::EXPR_END | Ripper::EXPR_ENDFN | Ripper::EXPR_CMDARG)
+ if @tokens.size >= 2 and @tokens.last[2].end_with?("\n") and @tokens[-2][3].nobits?(Ripper::EXPR_END | Ripper::EXPR_ENDFN | Ripper::EXPR_CMDARG | Ripper::EXPR_LABEL)
return 1
end
@tokens.each_with_index do |t, index|