From 3616b07c9aaafe49779d31bcd3e0d9ada6791777 Mon Sep 17 00:00:00 2001 From: shugo Date: Sun, 3 Dec 2017 08:10:42 +0000 Subject: [PATCH] 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 --- io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/io.c b/io.c index e3d93059f1..efde08f45f 100644 --- a/io.c +++ b/io.c @@ -7488,10 +7488,10 @@ rb_f_print(int argc, const VALUE *argv) * ios.putc(obj) -> obj * * If obj is Numeric, write the character whose code is - * the least-significant byte of obj, otherwise write the first byte - * of the string representation of obj to ios. Note: This - * method is not safe for use with multi-byte characters as it will truncate - * them. + * the least-significant byte of obj. + * If obj is String, write the first character + * of obj to ios. + * Otherwise, raise TypeError. * * $stdout.putc "A" * $stdout.putc 65