[ruby/error_highlight] Use $stderr instead of STDERR for Ractor

https://github.com/ruby/error_highlight/commit/a221a4b0eb
This commit is contained in:
wanabe 2025-01-19 10:17:23 +09:00 committed by git
parent f33a76bfa9
commit e5f81e511f

View File

@ -58,7 +58,7 @@ module ErrorHighlight
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?
$stderr.winsize[1] if $stderr.tty?
rescue LoadError, NoMethodError, SystemCallError
# do not truncate when window size is not available
end