summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 3ddf904b96..6312de8c9c 100644
--- a/io.c
+++ b/io.c
@@ -2150,7 +2150,7 @@ rb_io_binmode(io)
OpenFile *fptr;
GetOpenFile(io, fptr);
- if ((fptr->mode & FMODE_BINMODE) && READ_DATA_BUFFERED(fptr->f)) {
+ if (!(fptr->mode & FMODE_BINMODE) && READ_DATA_BUFFERED(fptr->f)) {
rb_raise(rb_eIOError, "buffer already filled with text-mode content");
}
#ifdef __human68k__