diff options
Diffstat (limited to 'spec/ruby/core')
-rw-r--r-- | spec/ruby/core/dir/shared/open.rb | 1 | ||||
-rw-r--r-- | spec/ruby/core/process/spawn_spec.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/spec/ruby/core/dir/shared/open.rb b/spec/ruby/core/dir/shared/open.rb index 6df361e452..63e9036053 100644 --- a/spec/ruby/core/dir/shared/open.rb +++ b/spec/ruby/core/dir/shared/open.rb @@ -65,6 +65,7 @@ describe :dir_open, shared: true do it 'sets the close-on-exec flag for the directory file descriptor' do Dir.send(@method, DirSpecs.mock_dir) do |dir| io = IO.for_fd(dir.fileno) + io.autoclose = false io.close_on_exec?.should == true end end diff --git a/spec/ruby/core/process/spawn_spec.rb b/spec/ruby/core/process/spawn_spec.rb index 43e389ad7f..bbc8ceb1da 100644 --- a/spec/ruby/core/process/spawn_spec.rb +++ b/spec/ruby/core/process/spawn_spec.rb @@ -582,7 +582,7 @@ describe "Process.spawn" do r.close_on_exec = false w.close_on_exec = false - code = "fd = IO.for_fd(#{w.fileno}); fd.write 'abc'; fd.close" + code = "fd = IO.for_fd(#{w.fileno}); fd.autoclose = false; fd.write 'abc'; fd.close" pid = Process.spawn(ruby_cmd(code), @options) begin w.close |