pathmap_replace (String)

         # File lib/rake.rb, line 123
    123:     def pathmap_replace(patterns, &block)
    124:       result = self
    125:       patterns.split(';').each do |pair|
    126:         pattern, replacement = pair.split(',')
    127:         pattern = Regexp.new(pattern)
    128:         if replacement == '*' && block_given?
    129:           result = result.sub(pattern, &block)
    130:         elsif replacement
    131:           result = result.sub(pattern, replacement)
    132:         else
    133:           result = result.sub(pattern, '')
    134:         end
    135:       end
    136:       result
    137:     end