From acd9c439b6529d9d78d03bed64b30152a559ad7b Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Thu, 17 Jun 2021 10:40:46 +1000 Subject: [PATCH 1/2] fix IO::ARGF#read should return Int32 | Int64 --- src/io/argf.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/argf.cr b/src/io/argf.cr index a0af097ed594..346caed6a735 100644 --- a/src/io/argf.cr +++ b/src/io/argf.cr @@ -10,7 +10,7 @@ class IO::ARGF < IO @read_from_stdin = false end - def read(slice : Bytes) : Int32 + def read(slice : Bytes) : Int32 | Int64 first_initialize unless @initialized if current_io = @current_io From 477af044b65620f70d28224deb4b6fc2406f9edb Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Fri, 18 Jun 2021 06:56:49 +1000 Subject: [PATCH 2/2] argf read_count to return `Int32` --- src/io/argf.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/argf.cr b/src/io/argf.cr index 346caed6a735..afa92c2a545b 100644 --- a/src/io/argf.cr +++ b/src/io/argf.cr @@ -10,7 +10,7 @@ class IO::ARGF < IO @read_from_stdin = false end - def read(slice : Bytes) : Int32 | Int64 + def read(slice : Bytes) : Int32 first_initialize unless @initialized if current_io = @current_io @@ -25,7 +25,7 @@ class IO::ARGF < IO read_count = 0 end - read_count + read_count.to_i32 end # :nodoc: