Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
ErrorHighlight::DefaultFormatter.terminal_width
terminal_width
lib/error_highlight/formatter.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/error_highlight/formatter.rb, line 58
def self.terminal_width
# lazy load io/console, so it's not loaded when 'max_snippet_width' is set
require "io/console"
STDERR.winsize[1] if STDERR.tty?
rescue LoadError, NoMethodError, SystemCallError
# do not truncate when window size is not available
end
No documentation available