Skip to content

Instantly share code, notes, and snippets.

@ermaker
Created April 2, 2010 18:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ermaker/353518 to your computer and use it in GitHub Desktop.
Save ermaker/353518 to your computer and use it in GitHub Desktop.
.irbenv.rb
def safe_require *args
begin
require *args
yield if block_given?
rescue LoadError => e
warn e
end
end
IRB.conf[:PROMPT_MODE] = :SIMPLE
IRB.conf[:AUTO_INDENT] = true
safe_require 'rubygems'
safe_require 'map_by_method'
safe_require 'what_methods'
safe_require 'pp'
safe_require 'wirble' do
Wirble.init
Wirble.colorize
end
class Object
def local_methods obj=self
(obj.methods - obj.class.superclass.instance_methods).sort
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment