From f7ce2d3d44ee78399b5bda19d91b5dffabc3ef63 Mon Sep 17 00:00:00 2001 From: OpenCode User Date: Sun, 24 May 2026 00:24:42 +0300 Subject: [PATCH] fix: Bool | Nil cast for sync= on Crystal 1.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit returns . Direct assignment to with the nilable union fails on Crystal 1.20.1 at the type-checker level (comparable to issue #8). Change → so the RHS is always plain , matching what the caller already did before the partial fix that introduced . --- src/term-reader.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/term-reader.cr b/src/term-reader.cr index 456af0a..353a3ea 100644 --- a/src/term-reader.cr +++ b/src/term-reader.cr @@ -99,7 +99,7 @@ module Term yield ensure begin - @output.as(IO::FileDescriptor).sync = !!buffering + @output.as(IO::FileDescriptor).sync = buffering || false rescue end end