Skip to content

Instantly share code, notes, and snippets.

@jonahoffline
Created March 7, 2013 22:08
Show Gist options
  • Save jonahoffline/5112283 to your computer and use it in GitHub Desktop.
Save jonahoffline/5112283 to your computer and use it in GitHub Desktop.
My .irbrc configuration file
#!/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