Empty and return the buffer if zero size is given [Bug #18421] In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`. --- io.c | 8 ++++++-- test/ruby/test_io.rb | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-)
Related issues
Bug #18421: `IO#readpartial` and `IO#read_nonblock` return non-empty string on empty file
merge revision(s) fdf39963490cf2cf95b30d91bb9b35964c2c2350: [Backport #18421]