fix '%' for non-ruby files

only use % in ruby files and leave behavior in other files untouched