diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-08 08:31:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-08 08:31:01 +0000 |
commit | 519af46806ec86fd8ec47544f2bee3790b16118f (patch) | |
tree | e166204ea85000500b6d8e4ef3dc18adc546b213 /lib/irb | |
parent | 18c9bf5de3380c13d94b7e85f5daf739df30894a (diff) |
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/trunk@57027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
-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 879c45c565..ca01662eee 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -792,7 +792,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 |