Skip to content

Commit 134c670

Browse files
committed
Use IO constants, now that they are supported
1 parent 8f3cfb6 commit 134c670

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/truffle/io/wait.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ def nread
1414

1515
def ready?
1616
ensure_open_and_readable
17-
Truffle::IOOperations.poll(self, Truffle::IOOperations::POLLIN, 0) > 0
17+
Truffle::IOOperations.poll(self, IO::READABLE, 0) > 0
1818
end
1919

2020
def wait_readable(timeout = nil)
2121
ensure_open_and_readable
22-
Truffle::IOOperations.poll(self, Truffle::IOOperations::POLLIN, timeout) > 0 ? self : nil
22+
Truffle::IOOperations.poll(self, IO::READABLE, timeout) > 0 ? self : nil
2323
end
2424

2525
def wait_writable(timeout = nil)
2626
ensure_open_and_writable
27-
Truffle::IOOperations.poll(self, Truffle::IOOperations::POLLOUT, timeout) > 0 ? self : nil
27+
Truffle::IOOperations.poll(self, IO::WRITABLE, timeout) > 0 ? self : nil
2828
end
2929

3030
def wait_priority(timeout = nil)
3131
ensure_open_and_readable
32-
Truffle::IOOperations.poll(self, Truffle::IOOperations::POLLPRI, timeout) > 0 ? self : nil
32+
Truffle::IOOperations.poll(self, IO::PRIORITY, timeout) > 0 ? self : nil
3333
end
3434

3535

0 commit comments

Comments
 (0)