Project

General

Profile

Actions

Bug #14765

closed

Arguments passed to Open3.popen3() are not interpreted as wildcards

Added by Rushyanth (Rushyanth reddy) almost 6 years ago. Updated almost 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:87078]

Description

In console when we write

stdin, stdout, stderr, wait_thr = Open3.popen4("cat .*.yml")
stdout.readlines

All the files with names starting with . and ending in .yml are shown
But when we do

stdin, stdout, stderr, wait_thr = Open3.popen4("cat", ".*.yml")
stdout.readlines

It returns an empty array
stderr.readlines says ["cat: .*.yml: No such file or directory\n"]
Because it is interpreting the string arguments as it is and looking for a file with name .*.yml and not interpreting as in the first case.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0