Commit 7ba2227
authored
test_dsl: fix test using pipe command (#5160)
**Which issue(s) this PR fixes**:
Fixes #5148
**What this PR does / why we need it**:
Related to #5159
I overlooked the fact that there were also tests using pipe commands in
another file.
Since Ruby 4.0, When we give pipe command in `Kernel.open`, it causes an
error.
```
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
-e:1: warning: Calling Kernel#open with a leading '|' is deprecated and will be removed in Ruby 4.0; use IO.popen instead
"Linux UM890 6.17.1-0-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 07 Oct 2025 07:57:35 +0000 x86_64 GNU/Linux\n"
$ ruby -w -v -e "Kernel.open('| uname -a'){|out| p out.read }"
ruby 4.0.0dev (2025-11-20T00:03:23Z master 167c3dbaa0) +PRISM [x86_64-linux]
-e:1:in 'File#initialize': No such file or directory @ rb_sysopen - | uname -a (Errno::ENOENT)
from -e:1:in 'Kernel.open'
from -e:1:in '<main>'
```
**Docs Changes**:
N/A
**Release Note**:
N/A
Signed-off-by: Shizuo Fujita <[email protected]>1 parent 8ac9690 commit 7ba2227
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
361 | 366 | | |
362 | 367 | | |
363 | | - | |
| 368 | + | |
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
| |||
372 | 377 | | |
373 | 378 | | |
374 | 379 | | |
| 380 | + | |
| 381 | + | |
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| |||
0 commit comments