File Directory Ruby

Dir.open('mydir') { |d| d.grep /file/ }