From 243939f97b9de2b7446b5fa3b8de512b7b77f0bb Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Sat, 25 Oct 2025 22:02:22 +0100 Subject: [PATCH 1/2] [DOC] Tweaks for StringIO.closed_read? --- ext/stringio/stringio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index ca71bb48..28504df0 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -629,7 +629,14 @@ strio_closed(VALUE self) * call-seq: * closed_read? -> true or false * - * Returns +true+ if +self+ is closed for reading, +false+ otherwise. + * Returns whether +self+ is closed for reading: + * + * strio = StringIO.new + * strio.closed_read? # => false + * strio.close_read + * strio.closed_read? # => true + * + * Related: StringIO.closed?, StringIO.closed_write?. */ static VALUE strio_closed_read(VALUE self) From 504ccf48960318217b491d3e39dabbbddbcbe669 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 12:21:36 -0500 Subject: [PATCH 2/2] Update stringio.c Update Related. --- ext/stringio/stringio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 28504df0..6686937b 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -636,7 +636,7 @@ strio_closed(VALUE self) * strio.close_read * strio.closed_read? # => true * - * Related: StringIO.closed?, StringIO.closed_write?. + * Related: StringIO#closed?, StringIO#closed_write?, StringIO#close_read. */ static VALUE strio_closed_read(VALUE self)