Preview Ruby 4.1 is a preview. It can change before the final release. 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-4.1.0-preview1/lib/error_highlight/formatter.rb, line 58
def self.terminal_width
# lazy load io/console to avoid loading it when 'max_snippet_width' is manually set
require "io/console"
$stderr.winsize[1] if $stderr.tty?
rescue LoadError, NoMethodError, SystemCallError
# skip truncation when terminal window size is unavailable
end
No documentation available