Project

General

Profile

Bug #14765

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

In console when we write 

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

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

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

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

Back