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