diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-11-13 13:17:24 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-11-13 13:17:24 +0100 |
commit | 6d05967468ea58ba481259718f07b3cb5a386945 (patch) | |
tree | e21976cdae28f91bcac002dc463a099ca64d111d /spec/ruby/core/process/exec_spec.rb | |
parent | acbe7aa19705905e7ad1952395e98e8bfe583a97 (diff) | |
download | ruby-6d05967468ea58ba481259718f07b3cb5a386945.tar.gz |
Update to ruby/spec@b0b7f53
Diffstat (limited to 'spec/ruby/core/process/exec_spec.rb')
-rw-r--r-- | spec/ruby/core/process/exec_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/ruby/core/process/exec_spec.rb b/spec/ruby/core/process/exec_spec.rb index 0a2c2f77e7..deb8913b6b 100644 --- a/spec/ruby/core/process/exec_spec.rb +++ b/spec/ruby/core/process/exec_spec.rb @@ -193,9 +193,11 @@ describe "Process.exec" do map_fd_fixture = fixture __FILE__, "map_fd.rb" cmd = <<-EOC f = File.open(#{@name.inspect}, "w+") - child_fd = f.fileno + 1 - File.open(#{@child_fd_file.inspect}, "w") { |io| io.print child_fd } - Process.exec "#{ruby_cmd(map_fd_fixture)} \#{child_fd}", { child_fd => f } + File.open(#{__FILE__.inspect}, "r") do |io| + child_fd = io.fileno + File.open(#{@child_fd_file.inspect}, "w") { |io| io.print child_fd } + Process.exec "#{ruby_cmd(map_fd_fixture)} \#{child_fd}", { child_fd => f } + end EOC ruby_exe(cmd, escape: true) |