summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 19:35:20 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 19:35:20 +0000
commit7b37c8cdc539d32fc077f5f1620d21265ae70431 (patch)
tree4ea771ef766275abc8bf9d6af9be6c7ad6a590f0 /spec/ruby
parentbf4276b4a12fe96649358f3c395e2dbdcc05d0ac (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/process/fixtures/map_fd.rb3
-rw-r--r--spec/ruby/library/socket/unixsocket/recvfrom_spec.rb1
2 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/core/process/fixtures/map_fd.rb b/spec/ruby/core/process/fixtures/map_fd.rb
index fc542625b0..3ed887486b 100644
--- a/spec/ruby/core/process/fixtures/map_fd.rb
+++ b/spec/ruby/core/process/fixtures/map_fd.rb
@@ -1,6 +1,7 @@
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
diff --git a/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb b/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb
index f24caaf686..3e2eb69885 100644
--- a/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb
+++ b/spec/ruby/library/socket/unixsocket/recvfrom_spec.rb
@@ -77,6 +77,7 @@ with_feature :unix_socket do
@server_raw.bind(Socket.sockaddr_un(@path2))
@socket = UNIXSocket.for_fd(@server_raw.fileno)
+ @socket.autoclose = false
end
after do