diff options
| author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2025-10-26 20:01:33 -0500 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-10-27 01:02:14 +0000 |
| commit | daaa09bcc2c803ed52f744207d6f951d5b363226 (patch) | |
| tree | c5cb76efcff3cac5b468cee418afe71ea2892e8a /ext/stringio/stringio.c | |
| parent | 947e5baa8c24cdf2f2d146005e9c91a5733f80f6 (diff) | |
[ruby/stringio] [DOC] Tweaks for StringIO.closed_read?
(https://github.com/ruby/stringio/pull/152)
https://github.com/ruby/stringio/commit/7ded426718
Diffstat (limited to 'ext/stringio/stringio.c')
| -rw-r--r-- | ext/stringio/stringio.c | 9 |
1 files changed, 8 insertions, 1 deletions
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) |
