728729730731732733734735736737738
do { readCheck(readStream); try { c = readStream.fgetc(); } catch (EOFException e) { c = -1; } if (c != term) {
783784785786787788789790791792793
798799800801802803804805806807808
25702571257225732574257525762577257825792580
readCheck(stream); waitReadable(stream); stream.clearerr(); int c = stream.fgetc(); if (c == -1) { // CRuby checks ferror(f) and retry getc for non-blocking IO // read. We checks readability first if possible so retry should // not be needed I believe.