Skip to content

Commit

Permalink
'doo'::Mod from last tlabel with string fix
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Jan 18, 2015
1 parent 2841d67 commit 746583b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Expand Up @@ -1113,8 +1113,13 @@ private int yylex() throws IOException {
if (tok == Tokens.tSTRING_END && (yaccValue.equals("\"") || yaccValue.equals("'"))) {
if (((lex_state == LexState.EXPR_BEG || lex_state == LexState.EXPR_ENDFN) && !conditionState.isInState() ||
isARG()) && src.peek(':')) {
src.read();
tok = Tokens.tLABEL_END;
int c1 = src.read();
if (src.peek(':')) { // "mod"::SOMETHING (hack MRI does not do this)
src.unread(c1);
} else {
src.read();
tok = Tokens.tLABEL_END;
}
}
}

Expand Down

0 comments on commit 746583b

Please sign in to comment.