[Prototype-core] Enumerable Map() oddity.

2007-12-04 Thread John-David Dalton
Hi guys, This is really not a bug but I thought I would bring it to your attention. $$('[type=radio]').map(function(el){return el.next()}); // => [label, label] $$('[type=radio]').map(Element.next); // => [label, undefined] The "map" method is passing 2 params to the iterator. This makes the El

[Prototype-core] Enumerable...

2007-02-20 Thread Dan Webb
Hello, Just thought I would try to start a discussion around this ticket (not the exact solution, more just the comments on it): http://dev.rubyonrails.org/ticket/6650 as, looking back through the list, theres been no discussion here so far (although theres been a fair bit in the comments on th

[Prototype-core] Enumerable#grep: going beyond string representations

2007-02-03 Thread Christophe Porteneuve
I was discussing an issue with Enumerable#grep with sam: currently, it only allows basic regex matching against elements' toString methods. The optional iterator is *not* for computing an alternate test value, but for computing an alternate *returned* value. That's because grep was designed to mi