public void Close() { int fd = _fileDescriptor; _mode = _mode.Close(); _fileDescriptor = -1; if (_stream != null) { _stream = null; _context.CloseStream(fd); } }
public static void Close(RubyIO /*!*/ self) { if (self.Closed) { throw RubyExceptions.CreateIOError("closed stream"); } self.Close(); }