Created
April 1, 2010 15:14
-
-
Save samullen/351918 to your computer and use it in GitHub Desktop.
This file contains 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
# requires and stuff go here | |
def load_irbrc(path) | |
return if (path == ENV["HOME"]) || (path == '/') | |
load_irbrc(File.dirname path) | |
irbrc = File.join(path, ".irbrc") | |
load irbrc if File.exists?(irbrc) | |
end | |
# other ruby code in your .irbrc | |
load_irbrc Dir.pwd # probably should stay at the bottom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment