From b498863d7219355e91c6686694958a81d3a523e0 Mon Sep 17 00:00:00 2001 From: wanabe Date: Sun, 19 Jan 2025 10:17:23 +0900 Subject: [PATCH] Use `$stderr` instead of STDERR for Ractor --- lib/error_highlight/formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error_highlight/formatter.rb b/lib/error_highlight/formatter.rb index ba0093d..5180576 100644 --- a/lib/error_highlight/formatter.rb +++ b/lib/error_highlight/formatter.rb @@ -58,7 +58,7 @@ def self.max_snippet_width=(width) 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