Another bug - collections

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

Another bug - collections

Dave Mason
Hi again,

I don't see anything about reporting bugs on the wiki or web page, so, until told to do otherwise, I'll report bugs here.

        SequencableCollection>>copyFrom:to: is broken.  Which breaks allButFirst.

{1,2}  allButFirst -> {nil,2}

I just tried to fix it to:
        copyFrom: anIndex to: anotherIndex
                | range newCollection |
                range := anIndex to: anotherIndex.
                newCollection := self class new: range size.
                range do: [:each |
                    newCollection add: (self at: each)].
                ^newCollection

but when I do, I get:
        nil does not understand #selector

and it doesn't seem to work any better.

BTW, in the differences with other Smalltalks, you should probably mention that Strings are read-only (not a bad thing, but definitely different).

../Dave
Reply | Threaded
Open this post in threaded view
|

Re: Another bug - collections

Paul DeBruicker
On 06/11/2012 09:32 AM, Dave Mason wrote:
> I don't see anything about reporting bugs on the wiki or web page,


There is an issue tracker on Nicolas's github page for amber here:

https://github.com/NicolasPetton/amber/issues

Reply | Threaded
Open this post in threaded view
|

Re: Another bug - collections

Nicolas Petton
In reply to this post by Dave Mason
Dave Mason <[hidden email]> writes:

Hi,

Thanks for reporting it :)

You should report bugs on https://github.com/NicolasPetton/amber/issues
And checkif it works or not with the latest revision on master.

Cheer,
Nico

> Hi again,
>
> I don't see anything about reporting bugs on the wiki or web page, so, until told to do otherwise, I'll report bugs here.
>
> SequencableCollection>>copyFrom:to: is broken.  Which breaks allButFirst.
>
> {1,2}  allButFirst -> {nil,2}
>
> I just tried to fix it to:
> copyFrom: anIndex to: anotherIndex
> | range newCollection |
> range := anIndex to: anotherIndex.
> newCollection := self class new: range size.
> range do: [:each |
>    newCollection add: (self at: each)].
> ^newCollection
>
> but when I do, I get:
> nil does not understand #selector
>
> and it doesn't seem to work any better.
>
> BTW, in the differences with other Smalltalks, you should probably mention that Strings are read-only (not a bad thing, but definitely different).
>
> ../Dave

--
Nicolas Petton
http://nicolas-petton.fr