Gavin Kistner wrote:
> On Jan 16, 2006, at 8:05 AM, Daniel Harple wrote:
> 
>> On Jan 16, 2006, at 4:01 PM, Daniel Harple wrote:
>>
>>> You must require 'mathn'
>>
>>
>> Actually, this is partially wrong. #lcm is defined in rational, but  
>> mathn requires rational. So require 'rational', but require 'mathn'  
>> works too. Sorry.
> 
> 
> Ah, so the documentation isn't wrong, it's just confusing.
> 
> Tom, the issue is that Ruby allows different libraries to modify and  
> extend the same class. (So, Integer has a base set of methods  included 
> in the core, but including libraries like Rational adds  additional 
> methods.) Ruby's documentation system (RDoc) has the  ability to 
> conveniently merge the methods from all those libraries  under the 
> single class to which they belong. Unfortunately, it  doesn't make clear 
> which file or library each method comes from, and  the people who wrote 
> the documentation for these 'addon' methods did  not make clear which 
> library they came from.
> 
> Your confusion is certainly understandable.
> 
OK, I understand how the documentation got there.  It's a merged super 
set of all the methods from all the libraries.  Makes sense.

But it would be *really* useful if there was something in the docs to 
delineate where methods come from if they aren't provided in the core.

Otherwise you end up with people like me who have a lot less hair on 
either side of their head.

How would I go about identifying something like this in the future? 
Where I find an ri documented method that isn't in the core.
http://www.ruby-doc.org/stdlib/
by itself doesn't provide enough information unless I just poke around 
the table of contents hoping to get lucky.