Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Truffle] More character class specs passing.
  • Loading branch information
chrisseaton committed Oct 9, 2014
1 parent 8b1c4ae commit b6e67a3
Show file tree
Hide file tree
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
Expand Up @@ -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 {

Expand Down
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.