Skip to content

Commit

Permalink
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/parser/ParserSupport.java
Original file line number Diff line number Diff line change
@@ -1307,6 +1307,7 @@ private List<Integer> allocateNamedLocals(RegexpNode regexpNode) {
if (RubyLexer.getKeyword(names[i]) == null && !Character.isUpperCase(names[i].charAt(0))) {
int slot = scope.isDefined(names[i]);
if (slot >= 0) {
if (warnings.isVerbose()) warn(ID.AMBIGUOUS_ARGUMENT, getPosition(regexpNode), "named capture conflicts a local variable - " + names[i]);
locals.add(slot);
} else {
locals.add(getCurrentScope().addVariableThisScope(names[i]));
3 changes: 0 additions & 3 deletions test/mri/excludes/TestParse.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
exclude :test_arg_concat, "needs investigation"
exclude :test_assign_in_conditional, "needs investigation"
exclude :test_dstr_disallowed_variable, "needs investigation"
exclude :test_dynamic_constant_assignment, "needs investigation"
exclude :test_here_document, "needs investigation"
exclude :test_invalid_char, "needs investigation"
exclude :test_method_block_location, "needs investigation"
exclude :test_named_capture_conflict, "missing warning in parser (#2147)"
exclude :test_question, "needs investigation"
exclude :test_unused_variable, "missing warning in parser (#2147)"
exclude :test_void_expr_stmts_value, "1; next; 2 is figured via compile.c. IR can do equivalent for 9k. Not a huge issue for 1.7.x barring real issue"

0 comments on commit f1ead40

Please sign in to comment.