summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/io.c b/io.c
index 14807ae1ee..df05436dde 100644
--- a/io.c
+++ b/io.c
@@ -281,6 +281,11 @@ rb_io_get_write_io(VALUE io)
*
* IO.try_convert(STDOUT) # => STDOUT
* IO.try_convert("STDOUT") # => nil
+ *
+ * f = open("/tmp/zz.gz") # => #<File:/tmp/zz.gz>
+ * z = Zlib::GzipReader.open(f) # => #<Zlib::GzipReader:0x81d8744>
+ * IO.try_convert(z) # => #<File:/tmp/zz.gz>
+ *
*/
static VALUE
rb_io_s_try_convert(VALUE dummy, VALUE io)