Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
IO#binmode
() -> self
binmode → self
io.c
View on GitHub ↗
static VALUE
rb_io_binmode_m(VALUE io)
{
VALUE write_io;
rb_io_ascii8bit_binmode(io);
write_io = GetWriteIO(io);
if (write_io != io)
rb_io_ascii8bit_binmode(write_io);
return io;
}
Sets the stream’s data mode as binary (see Data Mode).
A stream’s data mode may not be changed from binary to text.
See also
#binmode?
#beep
#autoclose?
#check_winsize_changed
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0