-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jean-Philippe Encausse wrote: >>> 2. I understand the behavior of return because it is a function given to >>> each() but It's not the same behavior like in other programming language >> OFC it isn't. I have to say it again, you're using Enumerable there, which >> is by not a "normal loop" (which - obviously - would work as you expect). > - I don't remember, Was it In the same behavior in prototype 1.4? Yes.
> - So now I should use find() and my function should return true or false ? You really sound like desperately needing an Enumerable tutorial :)) As your name sounds like French, maybe TDD's work could be helpful: http://www.tddsworld.com/blogs/eapc/?2006/11/20/506-bien-developper-pour-le-web-20 No, I didn't read it yet, but, as TDD is a fellow Prototype brethren, I hope he did write something about Enumerable too. Christophe? ;-) Besides the official documentation (prototypejs.org), there's also a fine Enumerable and Hash tutorial written by Justin Palmer at: http://encytemedia.com/blog/articles/2005/12/07/prototype-meets-ruby-a-look-at-enumerable-array-and-hash HTH - -- Marius Feraru -----BEGIN PGP SIGNATURE----- iD8DBQFFwwgetZHp/AYZiNkRAvEdAJ9FWW9uB8w7w4xcF/eV+ii0Fg+NMgCg19co 5vqVozsgIplb8anPguBOlAc= =3GMB -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---