On Jan 22, 2008 5:45 AM, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
> Nicolás Sanguinetti a écrit :
> > proceed.curry.apply(proceed.bind(this), args).delay(seconds);
>
> OK, sorry about my earlier response, that's replying while just woken up
> and having a cold for you.
>
> You want to basically call a method with prefilled args in a delayed
> fashion, right?  You don't need curry if you already bind: bind can do
> it on the fly:
>
> proceed.bind(this, arg1, arg2...).delay(seconds);
>
> Now that should work just fine.

Yeah, it works, but what happens if the args are in an array? (you got
them from the arguments list, for example) :)

Anyway, good point, curry isn't needed

proceed.bind.apply(proceed, [this].concat(args)).delay(seconds)

Should work.

-Nicolas

> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to