def size_from_ioctl
      return if jruby?
      return unless @output.respond_to?(:ioctl)

      format = 'SSSS'
      buffer = ([0] * format.size).pack(format)
      if ioctl?(TIOCGWINSZ, buffer) || ioctl?(TIOCGWINSZ_PPC, buffer)
        rows, cols, = buffer.unpack(format)[0..1]
        return [rows, cols] if nonzero_column?(cols)
      end
    end
def size_from_ioctl
      return if jruby?
      return unless @output.respond_to?(:ioctl)

      format = 'SSSS'
      buffer = ([0] * format.size).pack(format)
      if ioctl?(TIOCGWINSZ, buffer) || ioctl?(TIOCGWINSZ_PPC, buffer)
        rows, cols, = buffer.unpack(format)[0..1]
        return [rows, cols] if nonzero_column?(cols)
      end
    end
Read terminal size from Unix ioctl

 @return [nil, Array[Integer, Integer]]

 @api private