ruby-changes:16275
From: matz <ko1@a...>
Date: Thu, 10 Jun 2010 09:11:43 +0900 (JST)
Subject: [ruby-changes:16275] Ruby:r28243 (trunk): * io.c (rb_io_putc): documentation updated to mention putc would
matz 2010-06-10 09:11:26 +0900 (Thu, 10 Jun 2010) New Revision: 28243 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28243 Log: * io.c (rb_io_putc): documentation updated to mention putc would not work well with multi-byte characters. [ruby-core:30697] * io.c (rb_f_putc): ditto. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 28242) +++ ChangeLog (revision 28243) @@ -1,3 +1,10 @@ +Thu Jun 10 09:10:08 2010 Yukihiro Matsumoto <matz@r...> + + * io.c (rb_io_putc): documentation updated to mention putc would + not work well with multi-byte characters. [ruby-core:30697] + + * io.c (rb_f_putc): ditto. + Wed Jun 9 22:51:50 2010 Tanaka Akira <akr@f...> * time.c (find_time_t): always outerpolate from past. Index: io.c =================================================================== --- io.c (revision 28242) +++ io.c (revision 28243) @@ -6012,9 +6012,11 @@ * call-seq: * ios.putc(obj) -> obj * - * If <i>obj</i> is <code>Numeric</code>, write the character whose - * code is <i>obj</i>, otherwise write the first character of the - * string representation of <i>obj</i> to <em>ios</em>. + * 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. * * $stdout.putc "A" * $stdout.putc 65 @@ -6040,6 +6042,9 @@ * Equivalent to: * * $stdout.putc(int) + * + * Refer to the documentation for IO#putc for important information regarding + * multi-byte characters. */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/