summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 15:09:48 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 15:09:48 +0000
commite58af076553ee2b49678b6f8d63fa94263978dc6 (patch)
treed0fb6d2cef8ac9088b59e7283712ea1f1a098bdf /lib
parenta14ba6e3d58d6f63f47c0549f60306c4989478ba (diff)
merge revision(s) 57027: [Backport #13012]
ruby-lex.rb: fix for label * lib/irb/ruby-lex.rb (identify_identifier): treat identifier just followed by a colon as a lable. this is not a precise solution but enough for the time being. [ruby-core:78526] [Bug #13012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 7189307e0a..d98c5afa3e 100644
--- a/lib/irb/ruby-lex.rb
+++ b/lib/irb/ruby-lex.rb
@@ -791,7 +791,7 @@ class RubyLex
token_c = TkSymbol2Token[trans[1]]
@lex_state = trans[0]
else
- if @lex_state != EXPR_FNAME
+ if @lex_state != EXPR_FNAME and peek(0) != ':'
if ENINDENT_CLAUSE.include?(token)
# check for ``class = val'' etc.
valid = true