[PATCH] kernel/MappedColl.st: Fix variable name typos

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] kernel/MappedColl.st: Fix variable name typos

Lee Duhem
Hi all,

In the definitions of MappedCollection>>reject: and MappedCollection>>select:
include the following code:

        | newMap |
        newMap := newMap select: [:key | aBlock value: (self at: key)].

The uninitialized temporary variable `newMap' has the value `nil', which
obviously cannot understand message `select:'. According to the semantic
of MappedCollection>>reject: or MappedCollection>>select:, the third
occurrence of `newMap' in the above code should be `map', so this `newMap'
may be a variable name typo. The attached patch could fix those variable
name typos.

lee

ChangeLog

2013-12-11  Lee Duhem <[hidden email]>

    * kernel/MappedColl.st: Fixs variable name typos in reject: and select:.

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Fix-variable-typos.patch (922 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] kernel/MappedColl.st: Fix variable name typos

Holger Freyther
On Wed, Dec 11, 2013 at 10:19:11PM +0800, Lee Duhem wrote:
> Hi all,

Hi!

> The uninitialized temporary variable `newMap' has the value `nil', which
> obviously cannot understand message `select:'. According to the semantic
> of MappedCollection>>reject: or MappedCollection>>select:, the third
> occurrence of `newMap' in the above code should be `map', so this `newMap'
> may be a variable name typo. The attached patch could fix those variable
> name typos.

thank your very much! I have included your fix and created a testcase
for the invocation of >>#select: and >>#reject:. The commits are currently
running on travis-ci and will be pushed to master soon.

holger


PS:
> 2013-12-11  Lee Duhem <[hidden email]>

GNU Changelog requires two spaces between "Duhem" and "<lee..."



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] kernel/MappedColl.st: Fix variable name typos

Lee Duhem
On Fri, Dec 13, 2013 at 6:40 PM, Holger Hans Peter Freyther
<[hidden email]> wrote:
> thank your very much! I have included your fix and created a testcase
> for the invocation of >>#select: and >>#reject:.

Thank you for the testcase.

lee

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk