The Trunk: Collections-eem.804.mcz

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

The Trunk: Collections-eem.804.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.804.mcz

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

Name: Collections-eem.804
Author: eem
Time: 25 August 2018, 3:03:35.102786 pm
UUID: e4fae5d7-2676-4f01-bc05-21ac3946d248
Ancestors: Collections-eem.803

Fix TranscriptStream class>>redirectToStdOut: on "platforms" where stdout is not necessarily available (Windows).  The existing implementation raises an error on start up on these "platforms".

=============== Diff against Collections-dtl.802 ===============

Item was changed:
  ----- Method: Dictionary>>fillFrom:with: (in category 'private') -----
  fillFrom: aCollection with: aBlock
  "Evaluate aBlock with each of aCollections's elements as the argument.  
  Collect the resulting values into self. Answer self."
 
+ aCollection isSequenceable
+ ifTrue:
+ [aCollection associationsDo:
+ [ :element | self add: (aBlock value: element)]]
+ ifFalse:
+ [aCollection keysAndValuesDo:
+ [ :key :value | self at: key put: (aBlock value: value)]]!
- aCollection keysAndValuesDo: [ :key :value |
- self at: key put: (aBlock value: value) ]!

Item was changed:
  ----- Method: TranscriptStream class>>redirectToStdOut: (in category 'preferences') -----
  redirectToStdOut: aBoolean
+ "In setting up redirection, first remove all dependents that are stdout,
+ which may include stale files from the last session.  Then add a dependency
+ only if asked to redirect to stdout. Blithely doing
+ Transcript removeDependent: FileStream stdout
+ raises an error if stdout is unavailable."
+ Transcript dependents do:
+ [:dep|
+ (dep isStream and: [dep name = #stdout]) ifTrue:
+ [Transcript removeDependent: dep]].
+ (RedirectToStdOut := aBoolean) ifTrue:
+ [Transcript addDependent: FileStream stdout]!
-
- (RedirectToStdOut := aBoolean)
- ifTrue: [Transcript addDependent: FileStream stdout]
- ifFalse: [Transcript removeDependent: FileStream stdout].!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-eem.804.mcz

Levente Uzonyi
Hi Eliot,

This one's ancestor is Collections-eem.803, but that's still in the Inbox.

Levente

On Sat, 25 Aug 2018, [hidden email] wrote:

> Eliot Miranda uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-eem.804.mcz
>
> ==================== Summary ====================
>
> Name: Collections-eem.804
> Author: eem
> Time: 25 August 2018, 3:03:35.102786 pm
> UUID: e4fae5d7-2676-4f01-bc05-21ac3946d248
> Ancestors: Collections-eem.803
>
> Fix TranscriptStream class>>redirectToStdOut: on "platforms" where stdout is not necessarily available (Windows).  The existing implementation raises an error on start up on these "platforms".
>
> =============== Diff against Collections-dtl.802 ===============
>
> Item was changed:
>  ----- Method: Dictionary>>fillFrom:with: (in category 'private') -----
>  fillFrom: aCollection with: aBlock
>   "Evaluate aBlock with each of aCollections's elements as the argument.
>   Collect the resulting values into self. Answer self."
>
> + aCollection isSequenceable
> + ifTrue:
> + [aCollection associationsDo:
> + [ :element | self add: (aBlock value: element)]]
> + ifFalse:
> + [aCollection keysAndValuesDo:
> + [ :key :value | self at: key put: (aBlock value: value)]]!
> - aCollection keysAndValuesDo: [ :key :value |
> - self at: key put: (aBlock value: value) ]!
>
> Item was changed:
>  ----- Method: TranscriptStream class>>redirectToStdOut: (in category 'preferences') -----
>  redirectToStdOut: aBoolean
> + "In setting up redirection, first remove all dependents that are stdout,
> + which may include stale files from the last session.  Then add a dependency
> + only if asked to redirect to stdout. Blithely doing
> + Transcript removeDependent: FileStream stdout
> + raises an error if stdout is unavailable."
> + Transcript dependents do:
> + [:dep|
> + (dep isStream and: [dep name = #stdout]) ifTrue:
> + [Transcript removeDependent: dep]].
> + (RedirectToStdOut := aBoolean) ifTrue:
> + [Transcript addDependent: FileStream stdout]!
> -
> - (RedirectToStdOut := aBoolean)
> - ifTrue: [Transcript addDependent: FileStream stdout]
> - ifFalse: [Transcript removeDependent: FileStream stdout].!