From: Xavier Noria Date: 2008-09-21T07:22:22+09:00 Subject: Re: for or each? I don't think the minimal editing distance between #each and #map and friends has anything to do. It is so unlikely that an #each becomes an #inject that I don't think that's a good explanation for why people prefer it over for. If <> becomes an #inject you just go an edit whatever you need. Nah I don't think so. The analogous for loop is written like this for item in collection # do something with item end I think #each has become the common for-idiom in Ruby because, you know, the community has converged to that choice by themselves. That's not very tangible, and perhaps may be due to the fact that blocks are ubiquitous in Ruby and #each is syntactically closer in your head to a lot of other stuff in Ruby. I'd say #each is not that much favoured in ERb templates.