Skip to content

Commit 79d3394

Browse files
razetimeeregon
authored andcommitted
add SyntaxError for Hash pattern
1 parent 8d58e21 commit 79d3394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/truffleruby/parser/PatternMatchingTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ public RubyNode translatePatternNode(ParseNode patternNode, RubyNode expressionV
291291

292292
currentValueToMatch = expressionValue;
293293

294+
294295
// TODO move the other cases to the visitor pattern
295296
switch (patternNode.getNodeType()) {
296297
case ARRAYPATTERNNODE:
297298
return this.visitArrayPatternNode((ArrayPatternParseNode) patternNode);
298-
case HASHPATTERNNODE:
299-
return this.visitHashPatternNode((HashPatternParseNode) patternNode);
299+
case HASHPATTERNNODE: // both of these throw the same exception, hence this is skipped.
300300
case FINDPATTERNNODE:
301301
final RubyContext context = RubyLanguage.getCurrentContext();
302302
var node = patternNode;

0 commit comments

Comments
 (0)