diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-12-19 09:47:22 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-12-19 13:36:43 +0900 |
| commit | 6f6ea70dcea1bbcb00774c1da58735a78c8924c2 (patch) | |
| tree | 6851ff204ebf3da8d296160c6ee56bf61c3291c8 /spec/ruby | |
| parent | bfba65d8c1fcdc75ea3fc0f78d8bc7514e7afabd (diff) | |
Just passing FDs does not need to create IO objects
Diffstat (limited to 'spec/ruby')
| -rw-r--r-- | spec/ruby/optional/capi/spec_helper.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb index 1076b206ec..e7abf46e6c 100644 --- a/spec/ruby/optional/capi/spec_helper.rb +++ b/spec/ruby/optional/capi/spec_helper.rb @@ -122,13 +122,9 @@ def setup_make opts = {} if /(?:\A|\s)--jobserver-(?:auth|fds)=(\d+),(\d+)/ =~ make_flags - begin - r = IO.for_fd($1.to_i(10), "rb", autoclose: false) - w = IO.for_fd($2.to_i(10), "wb", autoclose: false) - rescue Errno::EBADF - else - opts[r] = r - opts[w] = w + [$1, $2].each do |fd| + fd = fd.to_i(10) + opts[fd] = fd end end |
