Skip to content

Instantly share code, notes, and snippets.

use Rack::Config do |env|
# Store mtimes to track changes
@mtimes ||= Hash.new { |map, file| map[file] = File.mtime(file) }
# Check all loaded files for changes
$LOADED_FEATURES.each do |feature|
file = nil
# Let's see if we can find the file. 1.8 stores the string we
# pass to require plus the file extension. 1.9 actually stores