Created
January 2, 2013 18:38
-
-
Save leejarvis/4436738 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# wat | |
def reload_require(file) | |
path = File.expand_path(file) | |
$LOADED_FEATURES.delete(path) | |
require path | |
end | |
puts "Pre reload" | |
reload_require __FILE__ | |
puts "Post reload" | |
# Pre reload | |
# Pre reload | |
# Post reload | |
# Post reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment