Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1c5650b44c25
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f813c6ccc8df
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 9, 2016

  1. Copy the full SHA
    f13e2bb View commit details
  2. Copy the full SHA
    6b3fd1f View commit details
  3. Copy the full SHA
    f813c6c View commit details
Showing with 6 additions and 2 deletions.
  1. +4 −0 kernel/common/errno.rb
  2. +2 −2 kernel/common/io.rb
4 changes: 4 additions & 0 deletions kernel/common/errno.rb
Original file line number Diff line number Diff line change
@@ -29,6 +29,10 @@ def self.raise_waitreadable(message=nil)
raise IO::EAGAINWaitReadable, message
end

def self.raise_waitwritable(message=nil)
raise IO::EAGAINWaitWritable, message
end

def self.raise_eagain(message=nil)
raise_errno(message, Errno::EAGAIN::Errno)
end
4 changes: 2 additions & 2 deletions kernel/common/io.rb
Original file line number Diff line number Diff line change
@@ -655,8 +655,8 @@ def write_nonblock(str)
buffer.write_string(str)

if FFI.call_failed?(bytes_written = FFI::Platform::POSIX.write(@descriptor, buffer, left))
clear_nonblocking
Errno.handle("write_nonblock")
clear_nonblock
Errno.raise_waitwritable("write_nonblock")
end

left -= bytes_written