Project

General

Profile

Actions

Bug #2469

closed

Difference behavior of IO#read_nonblock and #read between 1.8 and 1.9

Added by ujihisa (Tatsuhiro Ujihisa) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-12-10 trunk 26055) [i386-darwin9.8.0]
Backport:
[ruby-core:27117]

Description

=begin
The following code doesn't finish on ruby 1.9 (both 1.9.1 and 1.9.2dev), while finishes with Errno::EAGAIN on ruby 1.8.7.

read, write = IO.pipe
write << 'hello'
read.read_nonblock(5)
read.read(5)

I checked it on i386-darwin9.8.0 and i686-linux.
(This code is extracted from spec/rubyspec/core/io/read_nonblock_spec.rb)
=end

Actions

Also available in: Atom PDF

Like0
Like0