[ruby-cvs:64638] normal:r57472 (trunk): io.c (rb_io_syswrite): avoid leaving garbage after write

normal at ruby-lang.org normal at ruby-lang.org
Tue Jan 31 07:03:58 JST 2017


normal	2017-01-31 07:03:57 +0900 (Tue, 31 Jan 2017)

  New Revision: 57472

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57472

  Log:
    io.c (rb_io_syswrite): avoid leaving garbage after write
    
    As with IO#write, IO#syswrite also generates garbage which can
    be harmful in hand-coded read-write loops.
    
    * io.c (swrite_arg, swrite_do, swrite_end): new
      (rb_io_syswrite): use new functions to cleanup garbage
      [ruby-core:78898] [Bug #13085]

  Modified files:
    trunk/io.c
    trunk/test/ruby/test_io.rb


More information about the ruby-cvs mailing list