ARGF.readchar â String or nil
Instance Public methods
Reads the next character from ARGF and returns it as a
String. Raises an EOFError after the last
character of the last file has been read.
For example:
$ echo "foo" > file $ ruby argf.rb file ARGF.readchar #=> "f" ARGF.readchar #=> "o" ARGF.readchar #=> "o" ARGF.readchar #=> "\n" ARGF.readchar #=> end of file reached (EOFError)
Please login to continue.