ako... wrote:
>>puts 'a-b-c-'.gsub(/(.)-/) { |str| str + '_' }
> 
> 
> i think this is incorrect. id appends an underscore. i need to replace
> it.

Ah, sorry, mis-read what yours did.

It appears that gsub has been written to depend on the magic variables,
because it gives you no other means of accessing the MatchData.

So, to use gsub like this and get the MatchData, your guess is as good
as mine as to how to get to it.  Just hold down shift and pound on the
keyboard until you guess the right bit of magic punctuation.

Sorry I couldn't help more,

-- 
Neil Stevens - neil / hakubi.us

'A republic, if you can keep it.' -- Benjamin Franklin