From 918dfe1741efe82823f51d48bb28eaaf4529afdc Mon Sep 17 00:00:00 2001 From: Kevin Menard Date: Mon, 8 Feb 2016 20:59:45 -0500 Subject: [PATCH] [Truffle] Create a rope directly from a j.l.String without going through ByteList. --- .../main/java/org/jruby/truffle/core/regexp/RegexpNodes.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java b/truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java index c2401c59077..ed463948d2e 100644 --- a/truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java +++ b/truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java @@ -224,8 +224,7 @@ public static Rope shimModifiers(Rope bytes) { throw new UnsupportedOperationException(); } - // TODO (nirvdrum 25-Jan-16): We probably just want a way to create a Rope from a java.lang.String. - bytes = StringOperations.ropeFromByteList(ByteList.create(bytesString)); + bytes = StringOperations.createRope(bytesString, ASCIIEncoding.INSTANCE); } return bytes;