Project

General

Profile

Feature #3418 ยป io.c-putc.patch

runpaint (Run Paint Run Run), 06/10/2010 07:15 AM

View differences:

ext/Setup
29 29
#syslog
30 30
#tk
31 31
#win32ole
32
#zlib
32
zlib
io.c
6012 6012
 *  call-seq:
6013 6013
 *     ios.putc(obj)    -> obj
6014 6014
 *
6015
 *  If <i>obj</i> is <code>Numeric</code>, write the character whose
6016
 *  code is <i>obj</i>, otherwise write the first character of the
6017
 *  string representation of  <i>obj</i> to <em>ios</em>.
6015
 *  If <i>obj</i> is <code>Numeric</code>, write the character whose code is
6016
 *  the least-significant byte of <i>obj</i>, otherwise write the first byte
6017
 *  of the string representation of <i>obj</i> to <em>ios</em>. Note: This
6018
 *  method is not safe for use with multi-byte characters as it will truncate
6019
 *  them.
6018 6020
 *
6019 6021
 *     $stdout.putc "A"
6020 6022
 *     $stdout.putc 65
6023
 *     $stdout.putc 353
6024
 *     $stdout.putc "\u1234"
6021 6025
 *
6022 6026
 *  <em>produces:</em>
6023 6027
 *
6024
 *     AA
6028
 *     AAA\xE1
6025 6029
 */
6026 6030

  
6027 6031
static VALUE
......
6040 6044
 *  Equivalent to:
6041 6045
 *
6042 6046
 *    $stdout.putc(int)
6047
 * 
6048
 * Refer to the documentation for IO#putc for important information regarding
6049
 * multi-byte characters.
6043 6050
 */
6044 6051

  
6045 6052
static VALUE