Just as an additional precision, Prototype.K is *not* empty, it's the
identity (Kernel) function: it basically returns its first argument,
untouched.  Not to be mistaken with Prototype.EmptyFunction :-)

Brandon Aaron a écrit :
> Prototype.K is just an empty function. So if iterator is not defined
> it will just use an empty function instead. The !!() forces the
> returned value of the function to be a boolean.

Indeed, the !! trick (double-logical-negation) forces any value to be
converted to its boolean equivalent :-)

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to