title: How to order files by last modified time in ruby?
body: <p>How to get files in last modified time order in ruby? I was able to smash my keyboard enough to achieve this:</p>
  
  <pre><code>file_info = Hash[*Dir.glob("*").collect {|file| [file, File.ctime(file)]}.flatten]
  sorted_file_info = file_info.sort_by { |k,v| v}
  sorted_files = sorted_file_info.collect { |file, created_at| file }
  </code></pre>
  
  <p>But I wonder if there is more sophisticated way to do this?</p>