From: cardoso_tiago@... Date: 2016-04-07T12:49:59+00:00 Subject: [ruby-core:74840] [Ruby trunk Bug#12257] io/wait: wait_readable/writable working different than IO.select when descriptor not open Issue #12257 has been reported by Tiago Cardoso. ---------------------------------------- Bug #12257: io/wait: wait_readable/writable working different than IO.select when descriptor not open https://bugs.ruby-lang.org/issues/12257 * Author: Tiago Cardoso * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Coming from this pending issue: https://github.com/net-ssh/net-ssh/pull/303 Gist of it:
f = IO.popen("/bin/sh","r+") f.close_write f.wait_writable #=> IOError: not opened for writing IO.select(nil,[f],nil,10) #=> no errorThe way I see it, it should have the same behaviour, i.e. either IO.select should complain, or wait_writable should just return nil. -- https://bugs.ruby-lang.org/ Unsubscribe: