lib/async/scheduler.rb in async-2.1.0 vs lib/async/scheduler.rb in async-2.2.0

- old
+ new

@@ -158,16 +158,16 @@ return false ensure timer&.cancel end - if IO.const_defined?(:Buffer) - def io_read(io, buffer, length) - @selector.io_read(Fiber.current, io, buffer, length) + if IO::Event::Support.buffer? + def io_read(io, buffer, length, offset = 0) + @selector.io_read(Fiber.current, io, buffer, length, offset) end - def io_write(io, buffer, length) - @selector.io_write(Fiber.current, io, buffer, length) + def io_write(io, buffer, length, offset = 0) + @selector.io_write(Fiber.current, io, buffer, length, offset) end end # Wait for the specified process ID to exit. # @parameter pid [Integer] The process ID to wait for.