<div dir="ltr">Hi Levente,<div><br></div><div>You're right. The asString sends here are, I think, to guard against being given a text and Text not being protocol-compatible with String. That they're not protocol-compatible is a bug, but the system should still work. I'll take a look.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 1:48 PM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eliot,<br>
<br>
I think an #asString send is missing from the line<span class=""><br>
<br>
ifTrue: [(methodRef findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]]<br>
<br></span>
It should be<br>
<br>
ifTrue: [(methodRef asString findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]]<br>
<br>
It would be even better to store "methodRef asString" in a temporary variable.<br>
But taking a closer look at the code the #asString sends are unnecessary, because we already know that methodRef #isString is true. And there's no point in converting Symbols to Strings for #includesSubString: or #findTokens:.<span class="HOEnZb"><font color="#888888"><br>
<br>
Levente</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, 30 Jun 2015, <a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Eliot Miranda uploaded a new version of Tools to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Tools-eem.626.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Tools-eem.626.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-eem.626<br>
Author: eem<br>
Time: 30 June 2015, 3:05:48.319 pm<br>
UUID: 0bfae54b-3e68-4252-98d8-ddb1e56fc869<br>
Ancestors: Tools-mt.625<br>
<br>
Upgrade MessageSet class>>parse:toClassAndSelector:<br>
to allow one to construct text links in modern syntax, e.g.<br>
BitBlt class>>#subPixelRenderColorFonts<br>
<br>
=============== Diff against Tools-mt.625 ===============<br>
<br>
Item was changed:<br>
----- Method: MessageSet class>>parse:toClassAndSelector: (in category 'utilities') -----<br>
parse: methodRef toClassAndSelector: csBlock<br>
"Decode strings of the form <className> [class] <selectorName>."<br>
<br>
| tuple cl |<br>
<br>
<br>
self flag: #mref. "compatibility with pre-MethodReference lists"<br>
<br>
methodRef ifNil: [^ csBlock value: nil value: nil].<br>
methodRef isString ifFalse:<br>
[^methodRef setClassAndSelectorIn: csBlock].<br>
methodRef isEmpty ifTrue:<br>
[^csBlock value: nil value: nil].<br>
+ tuple := (methodRef asString includesSubString: '>>')<br>
+ ifTrue: [(methodRef findTokens: '>>') fold: [:a :b| (a findTokens: ' '), {b first = $# ifTrue: [b allButFirst] ifFalse: [b]}]]<br>
+ ifFalse: [methodRef asString findTokens: ' .'].<br>
- tuple := methodRef asString findTokens: ' .'.<br>
cl := Smalltalk at: tuple first asSymbol ifAbsent: [^ csBlock value: nil value: nil].<br>
^(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']])<br>
ifTrue: [csBlock value: cl value: (tuple at: 2) asSymbol]<br>
ifFalse: [csBlock value: cl class value: (tuple at: 3) asSymbol]!<br>
<br>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>