The Inbox: Collections-fm.581.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Collections-fm.581.mcz

commits-2
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-fm.581.mcz

==================== Summary ====================

Name: Collections-fm.581
Author: fm
Time: 13 August 2014, 10:17:12.868 pm
UUID: ce67809a-6c9a-584c-a4f3-51b6f069f1f8
Ancestors: Collections-nice.580

Expanded the range of character literals to cover Character space.
Character space was being treated as unprintable (as a literal), although it obviously is printable -albeit funny to read- which leads to say #($ ) inspected to print as {Character space}. It also makes the decompiler replace '$ ' by 'Character space' (which changes not just the source but also the (re)compilation result)

=============== Diff against Collections-nice.580 ===============

Item was changed:
  ----- Method: Character>>printOn: (in category 'printing') -----
  printOn: aStream
  | name |
+ self shouldBePrintedAsLiteral
- (value > 32 and: [value ~= 127])
  ifTrue: [ aStream nextPut: $$; nextPut: self ]
  ifFalse: [
  name := self class constantNameFor: self.
  name notNil
  ifTrue: [ aStream nextPutAll: self class name; space; nextPutAll: name ]
  ifFalse: [ aStream nextPutAll: self class name; nextPutAll: ' value: '; print: value ] ].!

Item was changed:
  ----- Method: Character>>shouldBePrintedAsLiteral (in category 'testing') -----
  shouldBePrintedAsLiteral
 
+ ^(value between: 32 and: 255) and: [value ~= 127]!
- ^(value between: 33 and: 255) and: [value ~= 127]!