Skip to content

Commit

Permalink
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -421,21 +421,6 @@ public Object matchGeneric(VirtualFrame frame, DynamicObject regexp, DynamicObje

}

@CoreMethod(names = "escape", onSingleton = true, required = 1)
public abstract static class EscapeNode extends CoreMethodArrayArgumentsNode {

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

@TruffleBoundary
@Specialization(guards = "isRubyString(pattern)")
public DynamicObject escape(DynamicObject pattern) {
return createString(StringOperations.encodeRope(org.jruby.RubyRegexp.quote19(new ByteList(StringOperations.getByteListReadOnly(pattern)), true).toString(), UTF8Encoding.INSTANCE));
}

}

@CoreMethod(names = "hash")
public abstract static class HashNode extends CoreMethodArrayArgumentsNode {

0 comments on commit b268d3c

Please sign in to comment.