# Ri usage

**URL:** <https://www.ruby-forum.com/t/ri-usage/85940>\
**Category:** Ruby\
**Created:** [February 17, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/ri-usage/85940 "2007-02-17T22:18:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [February 17, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/ri-usage/85940/1 "2007-02-17T22:18:26Z")

</div>

I am trying to learn how to use ri effectively. I was looking up  
methods for an Array. If I type Array.methods.sort at the irb prompt,  
it displays a whole slew of methods. If I then type “ri Array.sort” at  
the command prompt then I get a brief description of it. I noticed that  
Array class has an “&” method. I am trying to look it up using ri as  
follows:  
ri Array.&  
It does not work. How do I lookup the “&” method for an Array class  
using ri?

Another question related to ri is that if I type  
ri Array  
I get a whole lot of stuff on the Array class. It seems like the screen  
buffer responds to “vi” style movement keys, e.g., CTRL-F for forward  
one screen CTRL-B for one screen back,etc. I noticed that the  
documentation says “&” is an Instance method and the screen prompt waits  
at “:”, is there any command that I can type here which will get me more  
info on the desired method listed such as “&” for example?  
Is there a brief how to guide available for using “ri”?  
Thanks.  
Bharat

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [February 17, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/ri-usage/85940/2 "2007-02-17T22:37:29Z")

</div>

Hi,

On Saturday 17 February 2007 22:18, Bharat R. wrote:

> I am trying to learn how to use ri effectively. Â I was looking up  
> methods for an Array. Â If I type Array.methods.sort at the irb prompt,  
> it displays a whole slew of methods. Â If I then type “ri Array.sort” at  
> the command prompt then I get a brief description of it. Â I noticed that  
> Array class has an “&” method. Â I am trying to look it up using ri as  
> follows:  
> ri Array.&

You should use # as a separator, try e.g. ‘Array#&’.

> It does not work. Â How do I lookup the “&” method for an Array class  
> using ri?

The ri(1) manual page has some information… but I’m sure that you’d  
like a  
better (and way faster) tool: try fastri  
[http://eigenclass.org/hiki.rb?fastri](http://eigenclass.org/hiki.rb?fastri)

HTH

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [February 17, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/ri-usage/85940/3 "2007-02-17T22:57:33Z")

</div>

Le samedi 17 fÃ©vrier 2007 22:18, Bharat R. a Ã©critÂ :

> Another question related to ri is that if I type  
> ri Array  
> I get a whole lot of stuff on the Array class. It seems like the screen  
> buffer responds to “vi” style movement keys, e.g., CTRL-F for forward  
> one screen CTRL-B for one screen back,etc. I noticed that the  
> documentation says “&” is an Instance method and the screen prompt waits  
> at “:”, is there any command that I can type here which will get me more  
> info on the desired method listed such as “&” for example?  
> Is there a brief how to guide available for using “ri”?  
> Thanks.  
> Bharat

You should surround the argument with ’ or ", since “&” has a special  
meaning  
for the shell :

ri ‘Array.&’

ri --help warns about this issue, and gives the basic of its use.

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [February 17, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/ri-usage/85940/4 "2007-02-17T23:43:55Z")

</div>

Thank you gents.

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [February 18, 2007, 11:14am UTC](https://www.ruby-forum.com/t/ri-usage/85940/5 "2007-02-18T11:14:10Z")

</div>

hello

you should check out fastri:

[http://eigenclass.org/hiki.rb?fastri](http://eigenclass.org/hiki.rb?fastri)

have fun

edward
