[squeak-dev] Re: Bug in Method Finder dating from 3.8
Oscar Nierstrasz
oscar.nierstrasz at gmail.com
Thu Jul 3 09:29:23 UTC 2008
I found the source of the bug.
1 . 1 . 2
will cause the MethodFinder to try:
1 perform: #printStringBase: withArguments: #(1)
i.e., 1 printStringBase: 1
This generates an infinite loop within Integer>>printStringBase:
Integer>>printStringBase: should be corrected to complain if its
argument (base) is less than 2.
I tried the obvious "self assert: base > 1.", but the Method Finder
does not like this since it only catches Errors, not
AssertionFailures, so the fix is as follows:
Integer>>printStringBase: base
| stream integer next |
(base < 2) ifTrue: [Error signal: 'base must be >= 2'].
... "rest as before"
I did not find any error in the example 'abc' . 'ab' .
- on
On Jul 3, 2008, at 10:27, Serge Stinckwich wrote:
> Damien Cassou a écrit :
>> On Thu, Jul 3, 2008 at 9:53 AM, Serge Stinckwich
>> <Serge.Stinckwich at gmail.com> wrote:
>>> There is a bug with the Method finder tool. Try for example : 1.
>>> 1. 2.
>>> It runs forever ...
>> Try the same thing in any base Squeak image starting from Squeak 3.8.
>> It seems you found a long-standing bug.
>
>
> I usually show the method finder to Smalltalk beginners. It's the
> first time, i see this one ;-)
> There is another one. Try : 'abc'. 'ab' and choose the method found
> to launch an error.
>
> --
> Serge Stinckwich
> http://blog.doesnotunderstand.org/
>
>
More information about the Squeak-dev
mailing list
|