2013-04-01 08:03:20 +11:00
|
|
|
require 'irb/ext/save-history'
|
|
|
|
require 'irb/completion'
|
|
|
|
|
|
|
|
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
|
|
|
|
|
|
|
|
IRB.conf[:SAVE_HISTORY] = 1000
|
|
|
|
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
|
|
|
|
|
2008-10-09 12:51:52 +11:00
|
|
|
class Object
|
|
|
|
# Return a list of methods defined locally for a particular object. Useful
|
|
|
|
# for seeing what it does whilst losing all the guff that's implemented
|
|
|
|
# by its parents (eg Object).
|
|
|
|
def local_methods(obj = self)
|
|
|
|
(obj.methods - obj.class.superclass.instance_methods).sort
|
|
|
|
end
|
2009-06-10 13:02:44 +10:00
|
|
|
end
|