Aaron Patterson <tenderlove / ruby-lang.org> wrote:
> I spoke with matz about this issue at RubyConf.  I *think* he said it
> was a good feature, but he wanted a different API.  I can't remember
> exactly.
> 
> Maybe matz can comment?

I should also note there is one major API difference between Yehuda's
patch and the original kgio API:

kgio returns the unwritten portion of the String on a partial write and
nil on a full write (meaning there's nothing further to write from that
buffer).  kgio predates String#byteslice (and still needs to support
1.9.2), so I did the byteslice in C to avoid the overhead of doing it in
Rubies without String#byteslice.

Yehuda's patch always returns the number of bytes written if anything
was written, so his API is more consistent with traditional IO write
methods.


(Of course, kgio also supports libautocork-like behavior nowadays, but
 that's a separate issue :>)