Skip to content

Commit d45a5a4

Browse files
committed
Remove extra unused setUserObject()
* It is overwritten with a TStringWithEncoding later, and usages of getUserObject() always expect a TStringWithEncoding.
1 parent b6da0d5 commit d45a5a4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ public static String getRegexErrorMessage(AbstractTruffleString source, Exceptio
110110

111111
private static Regex getRegexpFromCache(TStringBuilder bytes, RubyEncoding encoding, RegexpOptions options,
112112
AbstractTruffleString source) throws DeferredRaiseException {
113-
final Regex newRegex = makeRegexp(null, bytes, options, encoding, source, null);
114-
newRegex.setUserObject(bytes);
115-
return newRegex;
113+
return makeRegexp(null, bytes, options, encoding, source, null);
116114
}
117115

118116
public ClassicRegexp(TStringWithEncoding strEnc, RegexpOptions originalOptions)

0 commit comments

Comments
 (0)