Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
io = fd, mode: mode, flags: flags)
# +io+ reads/writes bytes
file = io, encoding: Encodings::UTF16LE)
string = file.gets
puts string.encoding # => UTF16LE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment