method

getbyte

Importance_1
v1_9_3_392 - Show latest stable - 0 notes - Class: ARGF
getbyte() public

Gets the next 8-bit byte (0..255) from ARGF. Returns nil if called at the end of the stream.

For example:

$ echo "foo" > file
$ ruby argf.rb file

ARGF.getbyte #=> 102
ARGF.getbyte #=> 111
ARGF.getbyte #=> 111
ARGF.getbyte #=> 10
ARGF.getbyte #=> nil
Show source
Register or log in to add new notes.