From: Robert Dober Date: 2008-09-12T22:18:16+09:00 Subject: Re: Redefe each to include each_with_index and arity=2 On Wed, Sep 10, 2008 at 7:53 PM, DanDiebolt.exe wrote: > arity=2 > arity=-1 Where do you think the arity=-1 does come from? Does this ring a bell? Actually each_with_index will use a block with *args calling each again. Now that brings us to why your idea might not be as good as you thaught at first sight: [[:a, 42], [:b,43]].each{ |a,b| puts "#{a} => #{b}" } you see the arity of the block of each is indeed something which might vary with the usecase. HTH Robert -- C'est véritablement utile puisque c'est joli. Antoine de Saint Exupéry