matz critizes good solution argumenting with features lacking from some
widely available programming language:

> Maybe
> 
> |> |print logfile.size, "\n"
> 
> makes sense.  But unfortunately standard C does not provide the
> portable way to get the size of opened file.

Humm..how about:

  class File
    def size
      FileTest.size(self.path)
    end
  end

  p File.new("file_size.rb").size

I'm sure the above code could be made even more robust (for example to use
absolute paths so that Dir.chdir wouldn't matter).

Anyway I think this is a good way to go, the separation of features inside
File as a instance of class methods, and FileTest, seem somewhat arbitrary
for a beginner (I know there are reasons for this :) and I fell into that
trap too.

And I'd like to note there has been some earlier discussions
(http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/2829 ).

	- Aleksi