Method: StringIO#byte

Defined in:
lib/core_ext/stringio.rb

#byteFixnum

Reads a single byte from the current position of the byte stream

Returns:

  • (Fixnum)

    The numeric value of the byte at the current position



27
28
29
# File 'lib/core_ext/stringio.rb', line 27

def byte
  read(1)[0].ord
end