From: "David A. Black" Date: 2004-12-04T09:53:17+09:00 Subject: Re: Using yield Hi -- On Sat, 4 Dec 2004, Sam Stephenson wrote: > On Sat, 4 Dec 2004 09:32:39 +0900, Joe Van Dyk wrote: > > When do you use the 'yield' statement in code? > > When you want to write methods that take blocks. > > | def repeatedly_write(times, &block) You don't need &block there, since you don't use the block directly (you just yield to it). David -- David A. Black dblack@wobblini.net