From: Eric Mahurin Date: 2005-06-30T01:48:15+09:00 Subject: Re: yield does not take a block --- "Adam P. Jenkins" wrote: > Rather I have to wrap print > in a block: > > myArray.each { |elem| print elem } > > Wouldn't it have been cool to just be able to write: > > myArray.each print The reason you can't is because a method name by itself calls the method instead of returning the method object. If you had to put () to make the call and the method name by itself returned the method object (I would have preferred that), you could do this: myArray.each(&print) but, this should work fine right now: myArray.each(&method(:print)) __________________________________ Discover Yahoo! Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html