From: Jari Williamsson Date: 2008-02-08T18:24:05+09:00 Subject: Re: info on block arguments Robert Klemme wrote: >> It's almost like... passing a little method to >> another method as an argument, knowing that the method you're calling >> will execute that code in a certain way (just like you know it'll do >> other stuff to normal arguments you pass in) and give you back >> something helpful. > > Exactly. A block can be seen as an anonymous callback function. ...perhaps with one additional twist/feature, compared to callbacks in more "traditional" languages: Blocks inherit the environment from where it is defined (the scope is different for a block compared to a function). Best regards, Jari Williamsson