From: dblack@... Date: 2007-07-05T00:28:42+09:00 Subject: Re: block params scoping (was ruby-talk 257917: RE: Using a block to surround a string?) Hi -- On Thu, 5 Jul 2007, Gregory Brown wrote: > On 7/4/07, dblack@wobblini.net wrote: > >> My preference would be for it to stay as it now is (assignment >> semantics), without a warning. I've never been convinced that it's >> such a big problem, and I think it's a pity to do away with the >> assignment semantics which could prove useful. > > Can you show an example of where it might be useful? I was under the > impression that it simply reassigned to the last value passed into the > block (at the end of it all) and was having a hard time of finding a > feature in that behaviour. But I am open to enlightenment. :) I thought you might ask that :-) I can't think of anything brilliant right now, but if I do remember an example (and I know I've seen some in the past, though probably nothing you can't do some other way) I'll send it along. David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)