<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 12, 2017 at 4:56 PM,  <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A new version of Environments was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Environments-jr.70.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>inbox/Environments-jr.70.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Environments-jr.70<br>
Author: jr<br>
Time: 12 February 2017, 3:42:16.327498 pm<br>
UUID: cbbca4a2-6a97-2b40-92b8-<wbr>631bbfa519d0<br>
Ancestors: Environments-jr.69<br>
<br>
add hasClassOrTraitNamed:<br>
<br>
useful for lists of behaviors<br>
<br>
=============== Diff against Environments-jr.69 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Environment>><wbr>hasClassOrTraitNamed: (in category 'classes and traits') -----<br>
+ hasClassOrTraitNamed: aString<br>
+       Symbol hasInterned: aString ifTrue:<br>
+               [:symbol | | value |<br>
+               ^ ((value := declarations at: symbol ifAbsent: [nil])<br>
+                       isKindOf: Class) or: [value isKindOf: Trait]].<br>
+       ^ false.!<br></blockquote><div><br></div><div>Please do not introduce #isKindOf tests. All the other classOrTrait* methods use #isBehavior tests, which is way more general ... and also in line with your commit message ;)</div><div><br></div><div>I'd rather implement this along the lines of "^(self classOrTraitNamed: aString) notNil" which would also make the argument compatible with the range of strings allowed by classOrTraitNamed:.</div><div><br></div><div>We may want to add a Symbol internment check to that method, however.</div><div><br></div><div>- Bert -</div></div></div></div>