From: Michael Campbell Date: 2003-05-23T05:49:13+09:00 Subject: Re: why is "does" missing from this sub!-stitution? > > `fortune -m Nillity`.each do |x| > > x.sub!( /(_+\010+)([a-zA-Z]+)/, "-->#{$2}<--" ) > > print x > > end > > The second argument is evaluated only once (think about it), on > method > call, when $2 == nil. > > use > x.sub!( /(_+\010+)([a-zA-Z]+)/ ) { "-->#{$2}<--" } I've thought about it and still don't get it. __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com