[ruby-core:75681] Re: [Ruby trunk Bug#12413] Dir#close does not raise IOError on already closed handle on OS X

From: Eric Wong <normalperson@...>
Date: 2016-05-22 23:12:48 UTC
List: ruby-core #75681
djberg96@gmail.com wrote:
> Bug #12413: Dir#close does not raise IOError on already closed handle on OS X
> https://bugs.ruby-lang.org/issues/12413

> * ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
> ----------------------------------------
> The docs for Dir#close say "Closes the directory stream. Any further
> attempts to access dir will raise an IOError."

Seems to be a documentation bug, fixed in r55120
IO#close and Dir#close are idempotent on 2.3+

	https://bugs.ruby-lang.org/issues/10718

> Whereas on both Linux and Windows I get the expected error:
> 
>     IOError: closed directory

Older version of Ruby?

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next