Your cmd line has zero (i.e. zero) bytes in it. Using puts will not display null bytes, they will just be left out:
1.8.7 :001 > exec "\0" ArgumentError: string contains null byte from (irb):1:in `exec' from (irb):1 1.8.7 :002 > puts "n\0n" nn => nil
You should probably check how rep , svn_user and pxs to see if you can track the source of these null bytes, but you can use gsub! as a quick fix gsub! for delete them:
cmd.gsub!(/\0/, '')
matt
source share