Skip to content

Commit

Permalink
Fixes -(expr) and +(expr). Old parser was hard-coding +@ -@ within the
Browse files Browse the repository at this point in the history
generated parser versus using what the lexer provides (which was wrong
in the old lexer).

gem list loads yay.
enebo committed May 5, 2017
1 parent 13212d5 commit 9f2ee60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Original file line number Diff line number Diff line change
@@ -1708,7 +1708,7 @@ private int minus(boolean spaceSeen) throws IOException {
if (isBEG() || (isSpaceArg(c, spaceSeen) && arg_ambiguous())) {
setState(EXPR_BEG);
pushback(c);
yaccValue = MINUS;
yaccValue = MINUS_AT;
if (Character.isDigit(c)) {
return Tokens.tUMINUS_NUM;
}
@@ -1795,7 +1795,7 @@ private int plus(boolean spaceSeen) throws IOException {
c = '+';
return parseNumber(c);
}
yaccValue = PLUS;
yaccValue = PLUS_AT;
return Tokens.tUPLUS;
}

0 comments on commit 9f2ee60

Please sign in to comment.