Skip to content

Commit

Permalink
[Truffle] Remove old String#include? node.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 5, 2015
1 parent 77fd248 commit 6e85813
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
Expand Up @@ -737,29 +737,6 @@ public int getByte(RubyString string, int index) {
}
}

@CoreMethod(names = "__include?", required = 1)
public abstract static class IncludeQueryNode extends CoreMethodNode {

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

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

@Specialization
public boolean includeQuery(RubyString string, RubyString otherString) {
notDesignedForCompilation();

int foundIndex = StringSupport.index(string, string.getBytes(), string.length(),
otherString, otherString.getBytes(), otherString.length(),
0, string.getBytes().getEncoding());

return foundIndex != -1;
}
}

@CoreMethod(names = "inspect")
public abstract static class InspectNode extends CoreMethodNode {

Expand Down

1 comment on commit 6e85813

@nirvdrum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wrote this!

Please sign in to comment.