From daaa09bcc2c803ed52f744207d6f951d5b363226 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 26 Oct 2025 20:01:33 -0500 Subject: [ruby/stringio] [DOC] Tweaks for StringIO.closed_read? (https://github.com/ruby/stringio/pull/152) https://github.com/ruby/stringio/commit/7ded426718 --- 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 b24ab3f581..d593508e46 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -637,7 +637,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?, StringIO#close_read. */ static VALUE strio_closed_read(VALUE self) -- cgit v1.2.3