From: James O'Brien on
[Note: parts of this message were removed to make it a legal post.]

Hi,

I've been trying to learn about and use the ruby File class.

when I look at the documentation:

http://ruby-doc.org/core/classes/File.html

I cant see any mention that File < IO (it is a subclass and hence there are
a whole load of useful methods)

viz:

http://ruby-doc.org/core/classes/IO.html

here.. it DOES mention File as a subclass.


Am I doing something wrong or shouldnt the documentation be structured to
list inherited methods.. or maybe even the parent class would be a start??

many many thanks for clearing this up for me :))

From: James O'Brien on
[Note: parts of this message were removed to make it a legal post.]

anyone? :)

On Wed, Jul 21, 2010 at 9:39 AM, James O'Brien <jeob32(a)gmail.com> wrote:

> Hi,
>
> I've been trying to learn about and use the ruby File class.
>
> when I look at the documentation:
>
> http://ruby-doc.org/core/classes/File.html
>
> I cant see any mention that File < IO (it is a subclass and hence there are
> a whole load of useful methods)
>
> viz:
>
> http://ruby-doc.org/core/classes/IO.html
>
> here.. it DOES mention File as a subclass.
>
>
> Am I doing something wrong or shouldnt the documentation be structured to
> list inherited methods.. or maybe even the parent class would be a start??
>
> many many thanks for clearing this up for me :))
>

From: Joel VanderWerf on
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


From: Hassan Schroeder on
On Wed, Jul 21, 2010 at 4:02 PM, Joel VanderWerf
<joelvanderwerf(a)gmail.com> wrote:

> FWIW,
>
> $ ri File | head -n 1
> File < IO

? in what environment?

$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
$ ri File | head -n 1
------------------------------------------------------------ Class: File
$ jruby --1.9 -S ri File | head -n 1
--------------------------------------------------- Class: File < Object
$

[ above from OS X (10.6.4) standard MRI Ruby and JRuby 1.5.0 ]

--
Hassan Schroeder ------------------------ hassan.schroeder(a)gmail.com
twitter: @hassan

From: Joel VanderWerf on
Hassan Schroeder wrote:
> On Wed, Jul 21, 2010 at 4:02 PM, Joel VanderWerf
> <joelvanderwerf(a)gmail.com> wrote:
>
>> FWIW,
>>
>> $ ri File | head -n 1
>> File < IO
>
> ? in what environment?
>
> $ ruby -v
> ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
> $ ri File | head -n 1
> ------------------------------------------------------------ Class: File
> $ jruby --1.9 -S ri File | head -n 1
> --------------------------------------------------- Class: File < Object
> $
>
> [ above from OS X (10.6.4) standard MRI Ruby and JRuby 1.5.0 ]
>

$ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
$ ri File | head -n 1
File < IO