Skip to content

Commit

Permalink
Fixes #4314. 2.3 syntax failure: 'a b: 1' does not parse as method wi…
Browse files Browse the repository at this point in the history
…th kwarg
  • Loading branch information
enebo committed Nov 17, 2016
1 parent a93ed52 commit f755629
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ext/ripper/RipperLexer.java
Expand Up @@ -336,7 +336,7 @@ public int tokenize_ident(int result) {
String value = createTokenString();

if (!isLexState(last_state, EXPR_DOT|EXPR_FNAME) && parser.getCurrentScope().isDefined(value) >= 0) {
setState(EXPR_END);
setState(EXPR_END|EXPR_LABEL);
}

identValue = value.intern();
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/lexer/yacc/RubyLexer.java
Expand Up @@ -1056,7 +1056,7 @@ private int yylex() throws IOException {
private int identifierToken(int result, String value) {
if (result == Tokens.tIDENTIFIER && !isLexState(last_state, EXPR_DOT|EXPR_FNAME) &&
parserSupport.getCurrentScope().isDefined(value) >= 0) {
setState(EXPR_END);
setState(EXPR_END|EXPR_LABEL);
}

yaccValue = value;
Expand Down
1 change: 0 additions & 1 deletion test/mri/excludes/TestSyntax.rb
@@ -1,6 +1,5 @@
exclude :test__END___cr, "needs investigation"
exclude :test_alias_symbol, "needs investigation #4308"
exclude :test_cmdarg_kwarg_lvar_clashing_method, "needs investigation #4308"
exclude :test_constant_reassignment_nested, "needs investigation"
exclude :test_constant_reassignment_toplevel, "needs investigation"
exclude :test_dedented_heredoc_with_blank_more_indented_line, "needs investigation #4308"
Expand Down

0 comments on commit f755629

Please sign in to comment.