passing non-block to #do: freezes slate

Brian Rice water at tunes.org
Mon May 15 18:42:06 PDT 2006


On May 15, 2006, at 4:49 PM, Brian T. Rice wrote:

> Hi Tim,
>
> On Mon, May 15, 2006 11:29 am, Timmy Douglas said:
>>
>> running:
>>
>> #(1 2 3) do: {| :blah | blah }.
>>
>> doesn't seem to return. It should probably throw an error instead.
>
> Agreed. What I think is happening (without Slate at-hand) is an  
> attempt to
> call #do/#applyTo: on the array and then a MethodNotFound error  
> should be
> raised. Why this would induce an infinite loop, I cannot say just yet.

Okay, now that I've tested it, I see that it's a parser error, NOT a  
VM error:

Slate 1> #(1 2 3) do: {1. 2. 3}.
The method #applyTo: was not found for the following arguments:
{{...}. {...}}

So basically the problem is that a block header in an unexpected  
lexical context (specifically, a literal array, since I can't  
reproduce it in a couple of other situations) is not handled right  
and should be fixed. I'll see if I can fix this, but no guarantees.

--
-Brian
http://tunes.org/~water/brice.vcf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20060515/06f5fd50/PGP.pgp


More information about the Slate mailing list