From: Roger Pack on 24 Jul 2010 08:25 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. Cheers! -r -- Posted via http://www.ruby-forum.com/.
First
|
Prev
|
Pages: 1 2 Prev: syswrite changes from 1.8 to 1.9 Next: Typical Ruby (non-rails) project structure. |