From: Rob Biedenharn Date: 2009-02-19T02:03:22+09:00 Subject: Re: Kernel#blah is documented as Object#blah. Why? On Feb 18, 2009, at 11:34 AM, Alex Fortuna wrote: > Hi guys. > > There are certain common methods that originate from module Kernel, > but > they're documented in class Object. > > E.g. > >> o = Object.new >> => # >> o.method :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? 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/ -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com +1 513-295-4739 Skype: rob.biedenharn