Skip to content
instance method

IO::Buffer#|

source | mask → io_buffer

Generate a new buffer the same size as the source by applying the binary OR operation to the source, using the mask, repeating as necessary.

Example
IO::Buffer.for("1234567890") | IO::Buffer.for("\xFF\x00\x00\xFF")
# =>
# #<IO::Buffer 0x0000561785ae3480+10 INTERNAL>
# 0x00000000  ff 32 33 ff ff 36 37 ff ff 30                   .23..67..0
See also #^ #~ #<=> #and! also in 4.1 · 3.4 · 3.3 · 3.2