public IRubyObject read(ThreadContext context) {
Ruby runtime = context.getRuntime();
OpenFile myOpenFile = getOpenFileChecked();
try {
myOpenFile.checkReadable(runtime);
myOpenFile.setReadBuffered();
return readAll();
} catch (InvalidValueException ex) {
throw getRuntime().newErrnoEINVALError();
} catch (EOFException ex) {