# HG changeset patch # User Stefan Vogel # Date 1557320694 -7200 # Node ID d0148c8428739afe56bc0ce0cf6bf5844a849cc2 # Parent 1857df80bf3ce9b8aa4484e5caed071b97b18531 #TUNING by stefan class: Symbol changed: #selectorWithoutNameSpace diff -r 1857df80bf3c -r d0148c842873 Symbol.st --- a/Symbol.st Wed May 08 15:04:19 2019 +0200 +++ b/Symbol.st Wed May 08 15:04:54 2019 +0200 @@ -204,7 +204,6 @@ - !Symbol methodsFor:'Compatibility-Squeak'! precedence @@ -415,15 +414,23 @@ This special format (a symbol starting with a colon) was chosen, because almost every other selector is legal, and this can be checked quickly by just looking at the first character." - ^ self nameSpaceAndSelectorParts second + |idx| + + self isNameSpaceSelector ifFalse:[ + "avoid copy" + ^ self + ]. + idx := self indexOf:$: startingAt:3. + ^ self copyFrom:idx + 2. " #':foo:' selectorWithoutNameSpace -> #':foo:' (bad format) - #':foo::bar' selectorWithoutNameSpace -> bar - #':Tools::bar' selectorWithoutNameSpace -> bar + #':foo::bar' selectorWithoutNameSpace -> #bar + #':Tools::bar' selectorWithoutNameSpace -> #bar " "Created: / 20-07-2010 / 10:41:32 / Jan Vrany " + "Modified (format): / 08-05-2019 / 14:47:24 / Stefan Vogel" ! !