Skip to content

Commit

Permalink
Showing 2 changed files with 17 additions and 5 deletions.
17 changes: 17 additions & 0 deletions core/src/main/java/org/jruby/truffle/nodes/core/NilClassNodes.java
Original file line number Diff line number Diff line change
@@ -107,6 +107,23 @@ public boolean nil() {
}
}

@CoreMethod(names = "to_a", needsSelf = false, maxArgs = 0)
public abstract static class ToANode extends CoreMethodNode {

public ToANode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public ToANode(ToANode prev) {
super(prev);
}

@Specialization
public RubyArray toA() {
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), null, 0);
}
}

@CoreMethod(names = "to_i", needsSelf = false, maxArgs = 0)
public abstract static class ToINode extends CoreMethodNode {

5 changes: 0 additions & 5 deletions spec/truffle/tags/language/regexp/character_classes_tags.txt

This file was deleted.

0 comments on commit b6e67a3

Please sign in to comment.