Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

ARGF#binmode

ARGF.binmode → ARGF

Puts ARGF into binary mode. Once a stream is in binary mode, it cannot be reset to non-binary mode. This option has the following effects:

  • Newline conversion is disabled.

  • Encoding conversion is disabled.

  • Content is treated as ASCII-8BIT.

See also #binmode? #argv #close also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0