Skip to content

Instantly share code, notes, and snippets.

@firebelly
Created November 1, 2011 15:34
Show Gist options
  • Save firebelly/1330833 to your computer and use it in GitHub Desktop.
Save firebelly/1330833 to your computer and use it in GitHub Desktop.
run w .irbrc
#!/usr/bin/ruby
# coding: utf-8
require 'rubygems'
require 'wirble'
require 'irb/completion'
# auto-complete
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES)
unless IRB.conf[:LOAD_MODULES].include?('irb/completion')
IRB.conf[:LOAD_MODULES] << 'irb/completion'
end
def ri(*arg)
system("ri #{arg.join" "}")
end
class Object
def __find_method(reg=Regexp.new)
self.methods.sort.grep reg
end
alias :fm :__find_method
end
# add syntax color
Wirble.init
Wirble.colorize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment