We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51403f6 commit 5bfd788Copy full SHA for 5bfd788
spec/ruby/core/process/exec_spec.rb
@@ -193,9 +193,11 @@
193
map_fd_fixture = fixture __FILE__, "map_fd.rb"
194
cmd = <<-EOC
195
f = File.open(#{@name.inspect}, "w+")
196
- child_fd = f.fileno + 1
197
- File.open(#{@child_fd_file.inspect}, "w") { |io| io.print child_fd }
198
- 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 }
199
+ Process.exec "#{ruby_cmd(map_fd_fixture)} \#{child_fd}", { child_fd => f }
200
+ end
201
EOC
202
203
ruby_exe(cmd, escape: true)
0 commit comments