[ruby-core:96151] [Ruby master Misc#16396] What is the reason for this behaviour of Find.find?

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-83019.20191209065522.826912f51aa3bf6b@ruby-lang.org>
Issue #16396 has been updated by stiuna (Juan Gregorio).


>     pp Dir['/tmp/**/**/']

Hello, I loved your alternative, from now on I'll use Dir. 

Regarding the "bug" of Find I think I can prove it one of these days I report it.

----------------------------------------
Misc #16396: What is the reason for this behaviour of Find.find?
https://bugs.ruby-lang.org/issues/16396#change-83019

* Author: stiuna (Juan Gregorio)
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
When I want to travel the paths that are in a 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 files
Find.find('D:') #Search only in the source folder where the .rb script is located

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

For the first case I have solved it like this:

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

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



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.