[squeak-dev] Daily Commit Log

commits at source.squeak.org commits at source.squeak.org
Thu Oct 30 23:55:02 UTC 2014


Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:

http://lists.squeakfoundation.org/pipermail/packages/2014-October/007357.html

Name: KernelTests-dtl.281
Ancestors: KernelTests-nice.280

Fix testCull methods to correspond to current behavior of block closures.
Existing test failures were masked by test methods that required recompilation.

Reference squeak-dev:

Date: Sun, 26 Oct 2014 02:35:23 +0200 (CEST)
From: Levente Uzonyi <leves at elte.hu>
To: The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] Why isn't BlockClosureTest>>testCull failing?
  
I think that behavior was changed not too long ago (1-2 years maybe). If
you decompile the method you'll see that it's actually

        self
                assert: 1
                equals: ([:x | x]
                                cull: 1).

It's because Squeak used to return the value of the last argument if the
block was empty, but had arguments.
The code should be

        self assert: nil equals: ([ :x | ] cull: 1).

Levente

On Sat, 25 Oct 2014, David T. Lewis wrote:

>If we have this:
>       [ :x | ] value: 1 ==> nil
>
>And this:
>       ([ :x | ] cull: 1) ==> nil
>
>But in BlockClosureTest>>testCull, we have this:
>
>       self assert: 1 equals: ([ :x | ] cull: 1).
>
>The test passes. How is this possible?

=============================================

http://lists.squeakfoundation.org/pipermail/packages/2014-October/007358.html

Name: Kernel-nice.882
Ancestors: Kernel-nice.881

No need to query which selector isDoIt, because DoIt methods are not installed anymore in the methodDictionary (for a few years yet).

=============================================


More information about the Squeak-dev mailing list