From 8de6b3c676188eca33129e743e3ff668e045d4e3 Mon Sep 17 00:00:00 2001 From: sue445 Date: Mon, 14 Oct 2024 11:38:02 +0900 Subject: [PATCH 1/2] Add `chomp` to `IO#readlines` --- core/io.rbs | 2 +- test/stdlib/IO_test.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/io.rbs b/core/io.rbs index 711c1d265..49446d77f 100644 --- a/core/io.rbs +++ b/core/io.rbs @@ -1701,7 +1701,7 @@ class IO < Object # # => ["First line", "Second line", "", "Fourth line", "Fifth line"] # f.close # - def readlines: (?String sep, ?Integer limit) -> ::Array[String] + def readlines: (?String sep, ?Integer limit, ?chomp: boolish) -> ::Array[String] #