summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-06 03:08:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-06 03:08:38 +0000
commitc6c6a74fed7aa5d73d13bd98f3e6204002eeec32 (patch)
tree60fef3b8a8357635a7c9957671a7980f1317148c /ext
parent71a0162235e2252f89ab8d91e9058ca066417663 (diff)
* ext/stringio/stringio.c: [DOC] add docs and example by @schneems [ci skip] [fix GH-527]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/stringio/stringio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 3fef619de6..db3732e072 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1493,6 +1493,16 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
/*
* Pseudo I/O on String object.
+ *
+ * Commonly used to simulate `$stdio` or `$stderr`
+ *
+ * === Examples
+ *
+ * require 'stringio'
+ *
+ * io = StringIO.new
+ * io.puts "Hello World"
+ * io.string #=> "Hello World"
*/
void
Init_stringio()