    # File escape.rb, line 101
      def shell_single_word(str)
        if str.empty?
          ShellEscaped.new_no_dup("''")
        elsif %r{\A[0-9A-Za-z+,./:=@_-]+\z} =~ str
          ShellEscaped.new(str)
        else
          result = ''
          str.scan(/('+)|[^']+/) {
            if $1
              result << %q{\'} * $1.length
            else
              result << "'#{$&}'"
            end
          }
          ShellEscaped.new_no_dup(result)
        end
      end