Bug 50805

GemStone/S 64 Bit



Unicode16 copyReplaceAll:with:, insertAll:at:, broken with String arguments; MNU _asUnicode16

Code changes in 3.7 pushed some behavior that was previously in a primitive to the Smalltalk level, resulting in the handling code being invoked. When the argument is a Unicode16, and the receiver is a legacy String, this resulted in sending #'_asUnicode16' to an instance of String, which does not implement that method.

Affected methods include copyReplaceAll:with:, insertAll:at:, and any methods that invoke these methods.


File in the following implementation of String >> _asUnicode16 as SystemUser, and commit.

category: 'Converting'
method: String
  "Return an instance of Unicode7 or Unicode16 using the
  minimum bytes per character required to represent the receiver.
  Return nil if the receiver is not representable as Unicode7 nor Unicode16."

  <primitive: 926>

  self _primitiveFailed:#_asUnicode16

Last updated: 12/15/23