See http://ruby-doc.org/core-2.0.0/Array.html#method-i-fetch

    ls = out.fetch("stdout", "").split("\n")