On Sep 16, 2011, at 12:49 AM, Gunther Diemant wrote:
>> 3. Is there any difference using Dir.entries "the directory"
>> compared to using
>> Dir.glob "*" if you use them on the same directory?
> 
> Yes. Dir.glob '*' will not return Unix-style hidden files (files that
> start with a dot).

Unless you ask it to:

irb(main):001:0> Dir['*']
=> ["Applications", "Code", "cookies.txt", "Desktop", "Documents", "Downloads", "git.tar.gz", "Library", "Movies", "Music", "Pictures", "Public", "Sites", "tmp", "Zeraw"]

irb(main):002:0> Dir['.*']
=> [".", "..", ".adobe", ".autotest", ".bash_history", ".bundler", ".CFUserTextEncoding", ".config", ".cups", ".DS_Store", ".dvdcss", ".editrocket", ".fontconfig", ".gdb_history", ".gem", ".gitconfig", ".gitk", ".gnome2", ".inkscape-etc", ".irb-history", ".irb_history", ".lesshst", ".MacOSX", ".monk", ".profile", ".psql_history", ".recently-used.xbel", ".ri", ".rs", ".rvm", ".rvmrc", ".sqlite_history", ".ssh", ".subversion", ".Trash", ".viminfo", ".Xauthority", ".Xcode"]