putc(p1)
public
If obj is Numeric, write the character whose code is obj,
otherwise write the first character of the
string representation of obj to ios.
$stdout.putc "A"
$stdout.putc 65
produces:
AA
Show source
static VALUE
rb_io_putc(VALUE io, VALUE ch)
{
char c = NUM2CHR(ch);
rb_io_write(io, rb_str_new(&c, 1));
return ch;
}