зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
18c9bf5de3
Коммит
519af46806
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче