File tree 1 file changed +3
-1
lines changed
core/src/main/java/org/jruby
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 58
58
import java .util .concurrent .ConcurrentHashMap ;
59
59
import java .util .concurrent .atomic .AtomicReferenceFieldUpdater ;
60
60
import org .jcodings .Encoding ;
61
+ import org .jcodings .specific .USASCIIEncoding ;
61
62
import org .jruby .anno .AnnotationBinder ;
62
63
import org .jruby .anno .AnnotationHelper ;
63
64
import org .jruby .anno .FrameField ;
@@ -611,7 +612,8 @@ private RubyString calculateRubyName() {
611
612
Collections .reverse (parents );
612
613
613
614
RubyString colons = runtime .newString ("::" );
614
- RubyString fullName = runtime .newString ();
615
+ RubyString fullName = runtime .newString (); // newString creates empty ByteList which ends up as
616
+ fullName .setEncoding (USASCIIEncoding .INSTANCE ); // ASCII-8BIT. 8BIT is unfriendly to string concats.
615
617
for (RubyString parent : parents ) {
616
618
fullName .cat19 (parent ).cat19 (colons );
617
619
}
You can’t perform that action at this time.
0 commit comments