Get all contents other than ".", "..", and hidden files.
d = Dir.open('mydir') d.reject { |f| f[0] == '.' } d.close