From: Brian Candler Date: 2004-10-06T22:02:34+09:00 Subject: Re: Use ri from irb ? On Wed, Oct 06, 2004 at 10:05:35AM +0100, Brian Candler wrote: > def ri(*names) > require 'rdoc/ri/ri_driver' > oargv = ARGV.dup > ARGV.replace names.map{|n| n.to_s} > RiDriver.new.process_args > ensure > ARGV.replace oargv > end There is another problem with this though: if you do ri 'foo' then irb exits completely. This is because process_args calls exit(1). I think it should do 'return 1', and then /usr/local/bin/ri can do exit ri.process_args instead. Just another suggestion for Dave while he's looking at this... Cheers, Brian.