summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-03 08:10:42 (GMT)
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-03 08:10:42 (GMT)
commit3616b07c9aaafe49779d31bcd3e0d9ada6791777 (patch)
treeba19661c3615a38d2cb26f794405b34ae9340d0c /io.c
parent436fd82ab734df9cc175f29a236b39377969ffe9 (diff)
Fix a documentation error of IO#putc.
IO#putc is multi-byte character safe when a String is given as its argument. [ruby-core:82019] [Bug #13741] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io.c b/io.c
index e3d9305..efde08f 100644
--- a/io.c
+++ b/io.c
@@ -7488,10 +7488,10 @@ rb_f_print(int argc, const VALUE *argv)
* ios.putc(obj) -> obj
*
* If <i>obj</i> is <code>Numeric</code>, write the character whose code is
- * the least-significant byte of <i>obj</i>, otherwise write the first byte
- * of the string representation of <i>obj</i> to <em>ios</em>. Note: This
- * method is not safe for use with multi-byte characters as it will truncate
- * them.
+ * the least-significant byte of <i>obj</i>.
+ * If <i>obj</i> is <code>String</code>, write the first character
+ * of <i>obj</i> to <em>ios</em>.
+ * Otherwise, raise <code>TypeError</code>.
*
* $stdout.putc "A"
* $stdout.putc 65