The following code will reproduce the bug:

while gets
    $_.gsub!(/[^\w\s]/, " %& ")
    print $_
end

-- Jon Aseltine (aseltine / cs.umass.edu) --