From: Eric Christopherson Date: 2010-07-22T15:03:37+09:00 Subject: Re: File class documentation On Wed, Jul 21, 2010 at 6:02 PM, Joel VanderWerf wrote: > James O'Brien wrote: >>> >>> I cant see any mention that File < IO (it is a subclass and hence there >>> are >>> a whole load of useful methods) > > FWIW, > > $ ri File | head -n 1 > File < IO James was referring to http://ruby-doc.org/core/classes/File.html , which indeed does not tell about inheritance from IO anywhere in it. That page is for Ruby 1.8.6, although you wouldn't know it by looking. To add to the confusion, that page seems to be actually describing ftools.rb, which adds methods to File; not the File class itself. For me, under 1.9.1p429 (RubyInstaller) under Windows, ri File says only this: (begin) ------------------------------------------------------- Class: File < IO [no description] ------------------------------------------------------------------------ Class methods: -------------- binread (end) ri IO shows: (begin) More than one method matched your request. You can refine your search by asking for information on one of: TkItemConfigMethod::__IGNORE_UNKNOWN_CONFIGURE_OPTION__ [gem tk_as_gem-0.1.0] TkItemConfigMethod::__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__! [gem tk_as_gem-0.1.0] (end) Is something missing from my Ruby installation? The online version at http://ruby-doc.org/ruby-1.9/classes/File.html is quite detailed. Jruby 1.5 ri shows detailed information for File and IO, although again its page for File is about ftools.rb, and it doesn't say File < IO. I get this both on Windows and Mac OS X. Charles, you don't know where this is coming from?? Finally, even though the 1.8.7 doc at http://ruby-doc.org/core-1.8.7/classes/File.html seems to describe the actual class, when I run ri File in Mac OS X using 1.8.7 I also get the spiel about ftools.rb instead of File per se.