[patch] Fix didn't understand message error in reverse of Interval

View: New views
3 Messages — Rating Filter:   Alert me  

[patch] Fix didn't understand message error in reverse of Interval

by Lee Duhem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

This patch fix the following error:

st> (1 to: 3) reverse
Object: Interval new "<0x403802d8>" error: did not understand #step
MessageNotUnderstood(Exception)>>signal (AnsiExcept.st:216)
Interval(Object)>>doesNotUnderstand: #step (AnsiExcept.st:1556)
Interval>>reverse (Interval.st:141)
UndefinedObject>>executeStatements (a String:1)
nil

I think we need a test case for reverse (maybe in tests/Ansi.st), but
I can't figure it out how to add one.

lee

ChangeLog:

2009-10-20  Lee Duhem  <lee.duhem@...>

        * Interval.st: Fix didn't understand message error in reverse.


_______________________________________________
help-smalltalk mailing list
help-smalltalk@...
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Interval.patch (458 bytes) Download Attachment

Re: [patch] Fix didn't understand message error in reverse of Interval

by Paolo Bonzini-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> This patch fix the following error:
>
> st> (1 to: 3) reverse

Thanks!

However, can you add instead the #step method to Interval?  That can be
useful anyway.

Regarding the testcase, I will take a look (Ansi.st is scary...)

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalk@...
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Re: [patch] Fix didn't understand message error in reverse of Interval

by Paolo Bonzini-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/19/2009 07:51 PM, Paolo Bonzini wrote:
>> This patch fix the following error:
>>
>> st>  (1 to: 3) reverse
>
> Thanks!
>
> However, can you add instead the #step method to Interval?  That can be
> useful anyway.

Sorry, I noticed now that there is indeed a #increment method, so I
applied your patch.

Paolo


_______________________________________________
help-smalltalk mailing list
help-smalltalk@...
http://lists.gnu.org/mailman/listinfo/help-smalltalk