Project

General

Profile

Misc #16396

Updated by sawa (Tsuyoshi Sawada) almost 5 years ago

When I have want to travel the paths that are in a script at `D:\Downloads\Ruby 2.5.3\rbL\comp\codeShort.rb` with disk this happens to me: 

 ``` ruby 
 #Source folder script: D:\Downloads\Ruby 2.5.3\rbL\comp\codeShort.rb -> In this folder there are few other files In the same folder,    the following searches 
 Find.find('D:') #Search only in the source folder where the `.rb` .rb script is located: located 

 ``` ruby #Source folder script: D:\Downloads\Ruby 2.5.3\rbL\codeShort.rb -> In this folder there are many files 
 Find.find('D:') 
 ``` 

 When I have a script at `D:\Downloads\Ruby 2.5.3\rbL\codeShort.rb` with many other files in #Search the same folder , the same code as above searches the entire disk D. D 
 ``` 

 To search For the entire disk D in the first case, case I did have solved it like this: 

 ``` ruby 
 Find.find('D:/') #Search the entire disk D 
 ``` 

 But I don't understand why the two in both cases behave differently with being the same instruction they behave differently just because they script are in different directories.

Back