File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -549,11 +549,16 @@ strio_set_string(VALUE self, VALUE string)
549549 * call-seq:
550550 * close -> nil
551551 *
552- * Closes +self+ for both reading and writing.
552+ * Closes +self+ for both reading and writing; returns +nil+:
553553 *
554- * Raises IOError if reading or writing is attempted.
554+ * strio = StringIO.new
555+ * strio.closed? # => false
556+ * strio.close # => nil
557+ * strio.closed? # => true
558+ * strio.read # Raises IOError: not opened for reading
559+ * strio.write # Raises IOError: not opened for writing
555560 *
556- * Related: StringIO#close_read, StringIO#close_write.
561+ * Related: StringIO#close_read, StringIO#close_write, StringIO.closed? .
557562 */
558563static VALUE
559564strio_close (VALUE self )
You can’t perform that action at this time.
0 commit comments