File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,9 @@ private static TruffleString ascii(String string) {
220
220
}
221
221
222
222
public static TruffleString lookupUSASCIITString (String string ) {
223
- if (string .length () == 1 ) {
223
+ if (string .isEmpty ()) {
224
+ return EMPTY_US_ASCII ;
225
+ } else if (string .length () == 1 ) {
224
226
return US_ASCII_SINGLE_BYTE [string .charAt (0 )];
225
227
} else {
226
228
return TSTRING_CONSTANTS .get (string );
Original file line number Diff line number Diff line change @@ -273,8 +273,7 @@ public abstract static class ASTNode extends CoreMethodArrayArgumentsNode {
273
273
protected Object ast (Object executable ,
274
274
@ Cached ToCallTargetNode toCallTargetNode ) {
275
275
final RootCallTarget callTarget = toCallTargetNode .execute (executable );
276
- ast (callTarget .getRootNode ());
277
- return nil ;
276
+ return ast (callTarget .getRootNode ());
278
277
}
279
278
280
279
private Object ast (Node node ) {
You can’t perform that action at this time.
0 commit comments