summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 08:30:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-21 08:30:09 +0000
commitacae1b4416f45a4f88aaef2d23e785a6b14087d9 (patch)
treeacec075393700c201efd71cc2e3356e43c13212f /io.c
parenta06c4fd090f2517465572bb2245efd3c06e3a438 (diff)
downloadruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.gz
ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.xz
ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.zip
* eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/io.c b/io.c
index 01b7e2a72..0d61e671b 100644
--- a/io.c
+++ b/io.c
@@ -2378,10 +2378,9 @@ static VALUE
rb_io_putc(io, ch)
VALUE io, ch;
{
- char c[2];
- c[0] = NUM2CHR(ch);
- c[1] = '\0';
- rb_io_write(io, rb_str_new(c, 1));
+ char c = NUM2CHR(ch);
+
+ rb_io_write(io, rb_str_new(&c, 1));
return ch;
}