Skip to content

Commit ea5d6d8

Browse files
authored
Merge pull request #508 from aycabta/use-console-winsize
Use IO.console.winsize instead of IO.console_size for JRuby 9k
2 parents 7c417a1 + 8cfa11d commit ea5d6d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rdoc/stats/normal.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: false
2-
require 'io/console/size'
2+
require 'io/console'
33

44
##
55
# Stats printer that prints just the files being documented with a progress
@@ -23,7 +23,7 @@ def print_file files_so_far, filename
2323

2424
# Print a progress bar, but make sure it fits on a single line. Filename
2525
# will be truncated if necessary.
26-
terminal_width = IO.console_size[1].to_i.nonzero? || 80
26+
terminal_width = IO.console.winsize[1].to_i.nonzero? || 80
2727
max_filename_size = terminal_width - progress_bar.size
2828

2929
if filename.size > max_filename_size then

0 commit comments

Comments
 (0)