From: Edwin Fine Date: 2006-11-24T14:17:03+09:00 Subject: Re: double-slashes in input causing trouble David Vallner wrote: > Edwin Fine wrote: >> new_body = body.sub(original_section) {|s| s = new_section} >> > > Using only {new_section} for the block should suffice, I doubt assigning > to a block parameter actually does anything outside the block. > > David Vallner Yes, I see. It works with the assignment as it is simply because the result of the assignment expression becomes the return value of the block. Thanks for pointing that out. I'm still learning Ruby :). And loving it. -- Posted via http://www.ruby-forum.com/.