Created
March 7, 2013 22:08
-
-
Save jonahoffline/5112283 to your computer and use it in GitHub Desktop.
My .irbrc configuration file
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
#!/usr/bin/env ruby | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
IRB.conf[:SAVE_HISTORY] = 1000 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history" | |
def y(obj) | |
puts obj.to_yaml | |
end | |
# Break out of the Bundler jail | |
# from https://github.com/ConradIrwin/pry-debundle/blob/master/lib/pry-debundle.rb | |
if defined? Bundler | |
Gem.post_reset_hooks.reject! { |hook| hook.source_location.first =~ %r{/bundler/} } | |
Gem::Specification.reset | |
load 'rubygems/custom_require.rb' | |
end | |
if defined? Rails | |
begin | |
require 'hirb' | |
Hirb.enable | |
rescue LoadError | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment