File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
src/main/java/org/truffleruby/parser Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -3129,30 +3129,23 @@ private static ArgumentsDescriptor getKeywordArgumentsDescriptor(RubyLanguage la
3129
3129
return EmptyArgumentsDescriptor .INSTANCE ;
3130
3130
}
3131
3131
3132
- final List <String > keywords = new ArrayList <>();
3133
- boolean alsoSplat = false ;
3134
-
3135
3132
for (ParseNodeTuple pair : keywordHashArgumentNode .getPairs ()) {
3136
3133
final ParseNode key = pair .getKey ();
3137
3134
final ParseNode value = pair .getValue ();
3138
3135
3139
3136
if (key instanceof SymbolParseNode &&
3140
3137
((SymbolParseNode ) key ).getName () != null ) {
3141
- keywords . add ((( SymbolParseNode ) key ). getName ()) ;
3138
+ return KeywordArgumentsDescriptor . INSTANCE ;
3142
3139
} else if (key == null && value != null ) {
3143
3140
// A splat keyword hash
3144
- alsoSplat = true ;
3141
+ return KeywordArgumentsDescriptor . INSTANCE ;
3145
3142
} else {
3146
3143
// For non-symbol keys
3147
- alsoSplat = true ;
3144
+ return KeywordArgumentsDescriptor . INSTANCE ;
3148
3145
}
3149
3146
}
3150
3147
3151
- if (!keywords .isEmpty () || alsoSplat ) {
3152
- return KeywordArgumentsDescriptor .INSTANCE ;
3153
- } else {
3154
- return EmptyArgumentsDescriptor .INSTANCE ;
3155
- }
3148
+ return EmptyArgumentsDescriptor .INSTANCE ;
3156
3149
}
3157
3150
3158
3151
private static HashParseNode findLastHashParseNode (ParseNode node ) {
You can’t perform that action at this time.
0 commit comments