Permalink
Browse files

CommonMethods pass an IO object directly

  • Loading branch information...
1 parent 69a76db commit 76f3ebe47dcb626b504af3743f3fde16a05674eb @tarcieri tarcieri committed Feb 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/celluloid/io/common_methods.rb
@@ -34,7 +34,7 @@ def readpartial(length, buffer = nil)
read_nonblock(length, buffer)
rescue ::IO::WaitReadable
# Le sigh, exceptions for control flow ;(
- __get_actor.wait_readable self
+ __get_actor.wait_readable self.to_io
retry
end
@@ -49,7 +49,7 @@ def write(string)
begin
written = write_nonblock(string)
rescue ::IO::WaitWritable
- __get_actor.wait_writable self
+ __get_actor.wait_writable self.to_io
retry
rescue EOFError
return total_written

0 comments on commit 76f3ebe

Please sign in to comment.