il Wed, 24 Mar 2004 22:48:29 +0900, Tanaka Akira <akr / m17n.org> ha
scritto::


>> BTW: Why is 'm' of class String.  It would be nice if it were
>> an instance of MatchData.  If it had been a MatchData object,
>> then the following piece would have worked.
>>
>> str.gsub!(/(\s\w)(\w+)(\w\s)/) do |m|
>>     m[3] + m[2] + m[1]
>> end

following suggestion from flgr on #ruby-lang it would be nice to have 
gsub yielding a MatchData with to_str defined to still allow stuff
like

str.gsub(rgx) do |m|
 'str'+m
end