Sample .irbrc (with autocomplete)

Posted by root Sat, 02 Feb 2008 19:39:00 GMT

Usage: cp .irbrc $HOME; irb

require "irb/completion"

IRB.conf[:PROMPT_MODE] = :SIMPLE

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

Posted in  | Tags  | no comments

Comments

Comments are disabled