From: Roger Pack on
Eugen Ciur wrote:
> Hi,
> is there a way to call ri documentation from irb ?
> Something like:
> shell>irb
> irb(main):001:0> help inspect
> NameError: undefined method `execute' for module
> `IRB::ExtendCommand::Help'
> from (eval):4:in `instance_method'
> from (eval):4:in `help'
> from (irb):1
> from /usr/lib/ruby/1.8/rubygems.rb:1016

This is a bug in core and "should" work, really...

that being the case, here's my attempt at it:

$ gem install ri_for
$ irb
>> require 'rubygems'
>> require 'ri_for'
>> IO.ri_for :open
sig: Kernel#open arity -1
appears to be a c method
Searching ri for
sig: Kernel#open arity -1

ri_for gives you more than just ri--it gives you the source code where
available, which turns out to be quite useful.
Posted via