def size_from_io_console(verbose: nil)
      return if jruby?
      require 'io/console'

      begin
        if @output.tty? && IO.method_defined?(:winsize)
          size = @output.winsize
          size if nonzero_column?(size[1])
        end
      rescue Errno::EOPNOTSUPP
        # no support for winsize on output
      end
    rescue LoadError
      warn 'no native io/console support or io-console gem' if verbose
    end
def size_from_io_console(verbose: nil)
      return if jruby?
      require 'io/console'

      begin
        if @output.tty? && IO.method_defined?(:winsize)
          size = @output.winsize
          size if nonzero_column?(size[1])
        end
      rescue Errno::EOPNOTSUPP
        # no support for winsize on output
      end
    rescue LoadError
      warn 'no native io/console support or io-console gem' if verbose
    end
Detect screen size by loading io/console lib

 On Windows io_console falls back to reading environment
 variables. This means any user changes to the terminal
 size won't be reflected in the runtime of the Ruby app.

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

 @api private