--- a/CharacterArray.st Thu May 24 14:32:36 2018 +0200
+++ b/CharacterArray.st Thu May 24 14:33:19 2018 +0200
@@ -1965,7 +1965,7 @@
^ self
].
fmt := in next.
- (fmt ~~ $? and:[in peek ~~ $>]) ifTrue:[
+ (fmt ~~ $? and:[fmt ~~ $# and:[in peek ~~ $>]]) ifTrue:[
out nextPut:$<.
nr printOn:out.
out nextPut:fmt.
@@ -1989,10 +1989,11 @@
] ifFalse:[
out nextPutAll:arg asString string. "see method comment: arg must know #asString"
]
- ] ifFalse:[fmt == $? ifTrue:[
+ ] ifFalse:[(fmt == $? or:[fmt == $#]) ifTrue:[
s1 := in upTo:$:.
s2 := in nextUpTo:$>.
- arg == true ifTrue:[
+ ((fmt == $? and:[arg == true])
+ or:[(fmt == $# and:[arg == 1])]) ifTrue:[
out nextPutAll:s1
] ifFalse:[
out nextPutAll:s2