2 def self.open_with_mode(path, mode, perm)
3 Ruby.primitive :io_open
4 raise PrimitiveFailure, "primitive failed"
7 def self.create_pipe(lhs, rhs)
8 Ruby.primitive :create_pipe
9 raise PrimitiveFailure, "primitive failed"
13 Ruby.primitive :io_write
14 raise PrimitiveFailure, "IO#write failed. Might not have passed a string."
17 def prim_read(size, buffer)
18 Ruby.primitive :io_read
19 raise PrimitiveFailure, "primitive failed"
22 def prim_reopen(other)
23 Ruby.primitive :io_reopen
24 raise ArgumentError, "only accepts an IO object"
27 def prim_seek(amount, whence)
28 Ruby.primitive :io_seek
29 raise PrimitiveFailure, "primitive failed"
32 def prim_operation(which)
33 Ruby.primitive :io_operation
34 raise PrimitiveFailure, "primitive failed"
50 Ruby.primitive :io_close_ng
51 raise PrimitiveFailure, "IO#close primitive failed"