Skip to content

Commit 5efa831

Browse files
committed
Simplify check
1 parent 9400427 commit 5efa831

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/truffleruby/core/regexp/RegexpNodes.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ public abstract static class QuoteNode extends CoreMethodArrayArgumentsNode {
211211
@Specialization(guards = "isRubyString(raw)")
212212
protected DynamicObject quoteString(DynamicObject raw) {
213213
final Rope rope = StringOperations.rope(raw);
214-
boolean isAsciiOnly = rope.getEncoding().isAsciiCompatible() && rope.getCodeRange() == CodeRange.CR_7BIT;
215-
return getMakeStringNode().fromRope(ClassicRegexp.quote19(rope, isAsciiOnly));
214+
return getMakeStringNode().fromRope(ClassicRegexp.quote19(rope, rope.isAsciiOnly()));
216215
}
217216

218217
@Specialization(guards = "isRubySymbol(raw)")

0 commit comments

Comments
 (0)