aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 10:02:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 10:02:17 +0000
commitdbc5af97c766e667aa6aaa918cae1278afde69a7 (patch)
treed76b9a7dfda8bc4fe6579c52676b509813fbe21a /io.c
parentd5ae9837ffe13841f26c073914d61f9abb279272 (diff)
downloadruby-dbc5af97c766e667aa6aaa918cae1278afde69a7.tar.gz
* pack.c (pack_pack): remove unnecessary negative value check.
[ruby-dev:22329] * io.c (rb_io_ungetc): need fflush before ungetc if write buffer is filled. [ruby-dev:22330] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 19690ddc4d..87caa7651f 100644
--- a/io.c
+++ b/io.c
@@ -1315,6 +1315,7 @@ rb_io_ungetc(io, c)
GetOpenFile(io, fptr);
rb_io_check_readable(fptr);
+ flush_before_seek(fptr);
if (ungetc(cc, fptr->f) == EOF && cc != EOF)
rb_sys_fail(fptr->path);