1. 9
  1.  

  2. 2

    Use +"" or "".dup rather than String.new, unless you specifically want a string with binary encoding – the former will use the interpreter default, the latter will not.