ruby-changes:52246
From: eregon <ko1@a...>
Date: Sun, 19 Aug 2018 04:35:24 +0900 (JST)
Subject: [ruby-changes:52246] eregon:r64454 (trunk): Always set autoclose=false for IO.for_fd fds
eregon 2018-08-19 04:35:20 +0900 (Sun, 19 Aug 2018) New Revision: 64454 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64454 Log: Always set autoclose=false for IO.for_fd fds * I believe this should be default behavior, see [Feature #2250]. * Now make test-spec MSPECOPT='-R100 spec/ruby/library/socket' works fine. Modified files: trunk/spec/ruby/core/process/fixtures/map_fd.rb trunk/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb Index: spec/ruby/library/socket/unixsocket/recvfrom_spec.rb =================================================================== --- spec/ruby/library/socket/unixsocket/recvfrom_spec.rb (revision 64453) +++ spec/ruby/library/socket/unixsocket/recvfrom_spec.rb (revision 64454) @@ -77,6 +77,7 @@ with_feature :unix_socket do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb#L77 @server_raw.bind(Socket.sockaddr_un(@path2)) @socket = UNIXSocket.for_fd(@server_raw.fileno) + @socket.autoclose = false end after do Index: spec/ruby/core/process/fixtures/map_fd.rb =================================================================== --- spec/ruby/core/process/fixtures/map_fd.rb (revision 64453) +++ spec/ruby/core/process/fixtures/map_fd.rb (revision 64454) @@ -1,6 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/fixtures/map_fd.rb#L1 fd = ARGV.shift.to_i -f = File.for_fd fd +f = File.for_fd(fd) +f.autoclose = false begin f.write "writing to fd: #{fd}" ensure -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/