# Kernel#blah is documented as Object#blah. Why?

**URL:** <https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671>\
**Category:** Ruby\
**Created:** [February 18, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671 "2009-02-18T17:35:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [February 18, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671/1 "2009-02-18T17:35:09Z")

</div>

Hi guys.

There are certain common methods that originate from module Kernel, but  
they’re documented in class Object.

E.g.

> o = Object.new  
> =\> #Object:0xb76826c8  
> o.method :send  
> =\> #\<Method: Object(Kernel)#send\>

method’s #inspect clearly shows that #send originates from Kernel, but:

$ ri Kernel#send  
Nothing known about Kernel#send  
$ ri Object#send  
(ri page on #send)

Why this kind of confusion? Why not making methods like #send, #kind\_of?  
and a bunch of others _ACTUALLY_ belong to Object, thus making  
method.inspect() more accurate in terms of pointing to the proper place  
in the documentation?

---

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [February 18, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671/2 "2009-02-18T18:16:36Z")

</div>

On Wed, Feb 18, 2009 at 12:03 PM, Rob B.  
\<removed\_email\_address@domain.invalid

> wrote:

> It even helps with things like:  
> $ fri send  
> ------------------------------------------------------ Multiple choices:
> 
> ```
> Net::SSH::Transport::OutgoingPacketStream#send,
> Net::SSH::UserAuth::Pageant::Socket#send, Object#send,
> Resolv::DNS::Requester::ConnectedUDP::Sender#send,
> Resolv::DNS::Requester::TCP::Sender#send,
> Resolv::DNS::Requester::UnconnectedUDP::Sender#send,
> SOAP::HTTPStreamHandler#send, UDPSocket#send
> 
> ```

And as the name implies, it’s MUCH faster than ri, unless ri has made  
significant progress in that area since I pretty much stopped using it  
for  
fri, or it’s alter ego qri

–  
Rick DeNatale

Blog: [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)  
Twitter: [http://twitter.com/RickDeNatale](http://twitter.com/RickDeNatale)

---

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [February 18, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671/3 "2009-02-18T18:04:46Z")

</div>

On Feb 18, 2009, at 11:34 AM, Alex F.una wrote:

> > o.method :send  
> > Why this kind of confusion? Why not making methods like #send,  
> > #kind\_of?  
> > and a bunch of others _ACTUALLY_ belong to Object, thus making  
> > method.inspect() more accurate in terms of pointing to the proper  
> > place  
> > in the documentation?

Or use a different program for searching the ri docs, like fastri

## $ fri Kernel#send ------------------------------------------------------------ Object#send obj.send(symbol [, args…]) =\> obj obj. **send** (symbol [, args…]) =\> obj

It even helps with things like:  
$ fri send  
------------------------------------------------------ Multiple choices:

```
  Net::SSH::Transport::OutgoingPacketStream#send,
  Net::SSH::UserAuth::Pageant::Socket#send, Object#send,
  Resolv::DNS::Requester::ConnectedUDP::Sender#send,
  Resolv::DNS::Requester::TCP::Sender#send,
  Resolv::DNS::Requester::UnconnectedUDP::Sender#send,
  SOAP::HTTPStreamHandler#send, UDPSocket#send

```

[http://rubyforge.org/projects/fastri/](http://rubyforge.org/projects/fastri/)

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid  
+1 513-295-4739  
Skype: rob.biedenharn

---

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [February 18, 2009, 9:15pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671/4 "2009-02-18T21:15:49Z")

</div>

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

> > > =\> #Object:0xb76826c8
> > 
> > Why this kind of confusion? Why not making methods like #send,  
> > #kind\_of?  
> > and a bunch of others _ACTUALLY_ belong to Object, thus making  
> > method.inspect() more accurate in terms of pointing to the proper  
> > place  
> > in the documentation?
> 
> Or use a different program for searching the ri docs, like fastri

Fastri has been broken for months OMM.

$ fri Object  
(druby://127.0.0.1:50026) /usr/local/lib/ruby/1.8/yaml.rb:133:in  
`transfer': invalid subclass (TypeError) from (druby://127.0.0.1:50026) /usr/local/lib/ruby/1.8/yaml.rb:133:in `node\_import’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/1.8/yaml.rb:133:in `load' from (druby://127.0.0.1:50026) /usr/local/lib/ruby/1.8/yaml.rb:133:in `load’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/1.8/rdoc/ri/ri\_descriptions.rb:72:in `deserialize' from (druby://127.0.0.1:50026) /usr/local/lib/ruby/site_ruby/1.8/fastri/ri_index.rb:354:in `get\_class’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/site\_ruby/1.8/fastri/ri\_index.rb:354:in `open' from (druby://127.0.0.1:50026) /usr/local/lib/ruby/site_ruby/1.8/fastri/ri_index.rb:354:in `get\_class’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/site\_ruby/1.8/fastri/ri\_index.rb:352:in `each' from (druby://127.0.0.1:50026) /usr/local/lib/ruby/site_ruby/1.8/fastri/ri_index.rb:352:in `get\_class’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/site\_ruby/1.8/fastri/ri\_service.rb:209:in `info' from (druby://127.0.0.1:50026) /usr/local/lib/ruby/site_ruby/1.8/fastri/ri_service.rb:422:in `capture\_stdout’  
from (druby://127.0.0.1:50026)  
/usr/local/lib/ruby/site\_ruby/1.8/fastri/ri\_service.rb:208:in `info' from /usr/local/bin/fri:342 from /usr/local/bin/fri:337:in `each’  
from /usr/local/bin/fri:337

m.

---

<div class="post-metadata">

**Author:** ![absolute-beginner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Post date:** [February 18, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/kernel-blah-is-documented-as-object-blah-why/160671/5 "2009-02-18T18:18:23Z")

</div>

Rob,

Well, using alternative ri implementations might be a way out.

However, for me the point isn’t me not being able to find where #send is  
documented. ri also supports various kinds of listings etc.

The point is trying to figure out why certain methods are documented in  
(supposedly) wrong places, and, if possible, find ways to fix that. That  
way we’ll found a solid base for misc reflection-based doc solutions.

I’m currently writing a hack that relies upon reflection to  
automatically find where the documentation is. For Rails & other gems it  
works perfectly. For base Ruby – well, one of the issues is the topic  
of this post. 🙂
