<div dir="ltr"><div>Ah yes, that's right, it's because I made the minimal change to the method.<br></div>This is an un-necessary change anyway, but those RWBinaryOrTextStream are one of the things that most annoys me ;)<br>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/24 Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, 23 May 2013, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Nicolas Cellier uploaded a new version of Monticello to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Monticello-nice.545.mcz" target="_blank">http://source.squeak.org/<u></u>inbox/Monticello-nice.545.mcz</a><br>
<br></div><div class="im">
Item was changed:<br>
----- Method: MCMczWriter>><u></u>serializeDefinitions: (in category 'serializing') -----<br>
serializeDefinitions: aCollection<br>
| writer s |<br>
+ s := String new writeStream.<br>
- s := RWBinaryOrTextStream on: String new.<br>
writer := self snapshotWriterClass on: s.<br>
writer writeDefinitions: aCollection.<br>
^ s contents!<br>
</div></blockquote>
<br>
More nitpicking:<br>
Using "String new writeStream" is inefficient compared to "String streamContents: []". It also requires the use of local variables and an extra message send. How about this?<br>
<br>
serializeDefinitions: aCollection<br>
<br>
^String streamContents: [ :stream |<br>
(self snapshotWriterClass on: stream)<br>
writeDefinitions: aCollection ]<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Item was changed:<br>
----- Method: MCStReader>>readStream (in category 'evaluating') -----<br>
readStream<br>
+ | contents |<br>
+ contents := stream contents.<br>
^ ('!!!!<br>
<br>
+ ', ([contents utf8ToSqueak] on: InvalidUTF8 do: [:exc | exc return: contents])) readStream!<br>
- ', stream contents) readStream!<br>
<br>
Item was changed:<br>
----- Method: MCStWriter>>writeDefinitions: (in category 'writing') -----<br>
writeDefinitions: aCollection<br>
"initStream is an ugly hack until we have proper init defs"<br>
initStream := String new writeStream.<br>
<br>
(MCDependencySorter sortItems: aCollection)<br>
do: [:ea | ea accept: self]<br>
displayingProgress: 'Writing definitions...'.<br>
<br>
+ stream nextPutAll: initStream contents squeakToUtf8.!<br>
- stream nextPutAll: initStream contents.!<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>