We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f46624 commit 94bd4a3Copy full SHA for 94bd4a3
ext/stringio/stringio.c
@@ -614,8 +614,16 @@ strio_close_write(VALUE self)
614
* call-seq:
615
* closed? -> true or false
616
*
617
- * Returns +true+ if +self+ is closed for both reading and writing,
618
- * +false+ otherwise.
+ * Returns whether +self+ is closed for both reading and writing:
+ *
619
+ * strio = StringIO.new
620
+ * strio.closed? # => false # Open for reading and writing.
621
+ * strio.close_read
622
+ * strio.closed? # => false # Still open for writing.
623
+ * strio.close_write
624
+ * strio.closed? # => true # Now closed for both.
625
626
+ * Related: StringIO.closed_read?, StringIO.closed_write?.
627
*/
628
static VALUE
629
strio_closed(VALUE self)
0 commit comments