# "ri intern" not working?

**URL:** <https://www.ruby-forum.com/t/ri-intern-not-working/114965>\
**Category:** Ruby\
**Created:** [September 19, 2007, 11:14am UTC](https://www.ruby-forum.com/t/ri-intern-not-working/114965 "2007-09-19T11:14:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 19, 2007, 11:14am UTC](https://www.ruby-forum.com/t/ri-intern-not-working/114965/1 "2007-09-19T11:14:39Z")

</div>

strange that ri intern is not giving the String#intern

but ri superclass will give the Class#superclass

have to use ri String#intern

(using ri from InstantRails 1.7)

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 19, 2007, 11:18am UTC](https://www.ruby-forum.com/t/ri-intern-not-working/114965/2 "2007-09-19T11:18:16Z")

</div>

SpringFlowers AutumnMoon wrote:

> strange that ri intern is not giving the String#intern
> 
> but ri superclass will give the Class#superclass
> 
> have to use ri String#intern
> 
> (using ri from InstantRails 1.7)

oh it is actually showing… at the right hand side of a line…

by the way, sometimes ri is really slow. is there a way just to build  
the index or speed up the search?

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 19, 2007, 11:28am UTC](https://www.ruby-forum.com/t/ri-intern-not-working/114965/3 "2007-09-19T11:28:18Z")

</div>

On Behalf Of SpringFlowers AutumnMoon

# by the way, sometimes ri is really slow. is there a way just

# to build the index or speed up the search?

do yourself a favor, use fastri (faster w more features)

## botp@pc4all:~$ time fri string#intern ---------------------------------------------------------- String#intern str.intern =\> symbol str.to\_sym =\> symbol

```
 Returns the Symbol corresponding to str, creating the symbol if it
 did not previously exist. See Symbol#id2name.

    "Koala".intern #=> :Koala
    s = 'cat'.to_sym #=> :cat
    s == :cat #=> true
    s = '@cat'.to_sym #=> :@cat
    s == :@cat #=> true

 This can also be used to create symbols that cannot be represented
 using the :xxx notation.

    'cat and dog'.to_sym #=> :"cat and dog"

```

real 0m3.006s  
user 0m2.416s  
sys 0m0.200s  
botp@pc4all:~$ time qri string#intern  
\<…snip…\>

real 0m3.036s  
user 0m2.792s  
sys 0m0.216s

botp@pc4all:~$ time ri string#intern  
Bad argument: string#intern

real 0m12.493s  
user 0m7.520s  
sys 0m1.356s

ri is too slow and case sensitive.

kind regards -botp

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 19, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/ri-intern-not-working/114965/4 "2007-09-19T19:52:45Z")

</div>

SpringFlowers AutumnMoon [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> by the way, sometimes ri is really slow. is there a way just to build  
> the index or speed up the search?

gem install fastri

m.
