* 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
This commit is contained in:
nobu 2016-12-08 08:31:01 +00:00
Родитель 18c9bf5de3
Коммит 519af46806
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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