@@ -222,7 +222,7 @@ RubyString add(Object string, Object other,
222
222
@ Cached ToStrNode toStrNode ,
223
223
@ Cached StringHelperNodes .StringAppendNode stringAppendNode ) {
224
224
final var otherAsString = toStrNode .execute (this , other );
225
- return stringAppendNode .executeStringAppend (string , otherAsString );
225
+ return stringAppendNode .executeStringAppend (this , string , otherAsString );
226
226
}
227
227
}
228
228
@@ -3105,9 +3105,6 @@ protected boolean isMBCPrintable(Encoding encoding, int codePoint) {
3105
3105
@ Primitive (name = "string_append" )
3106
3106
public abstract static class StringAppendPrimitiveNode extends PrimitiveArrayArgumentsNode {
3107
3107
3108
- @ Child private StringHelperNodes .StringAppendNode stringAppendNode = StringHelperNodes .StringAppendNode
3109
- .create ();
3110
-
3111
3108
@ NeverDefault
3112
3109
public static StringAppendPrimitiveNode create () {
3113
3110
return StringAppendPrimitiveNodeFactory .create (null );
@@ -3116,8 +3113,9 @@ public static StringAppendPrimitiveNode create() {
3116
3113
public abstract RubyString executeStringAppend (RubyString string , Object other );
3117
3114
3118
3115
@ Specialization
3119
- RubyString stringAppend (RubyString string , Object other ) {
3120
- final RubyString result = stringAppendNode .executeStringAppend (string , other );
3116
+ RubyString stringAppend (RubyString string , Object other ,
3117
+ @ Cached StringHelperNodes .StringAppendNode stringAppendNode ) {
3118
+ final RubyString result = stringAppendNode .executeStringAppend (this , string , other );
3121
3119
string .setTString (result .tstring , result .getEncodingUnprofiled ());
3122
3120
return string ;
3123
3121
}
0 commit comments