Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

IO.binwrite

(::path name, ::_ToS string, ?::Integer offset, ?mode: ::String mode) -> ::Integer
IO.binwrite(path, string, offset = 0, **opts) → integer

Behaves like IO.write, except that the stream is opened in binary mode with ASCII-8BIT encoding.

See also .binread .console .copy_stream also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0