Hi,
In message "[ruby-talk:00607] How to pass by `new' method of superclass?"
on 99/08/10, clemens.hintze / alcatel.de <clemens.hintze / alcatel.de> writes:
|I try to assimilate Python's `StringIO' class to Ruby. Now I want to
|derive `StringIO' from `IO'. So that
|
| StringIO.new.is_a? IO
Do you really need inheritance relationship? Current Ruby requires
instances of the subclass of IO to have T_FILE structure.
With dynamic typing feature, defining all the methods which IO has in
StringIO is sufficient enough, isn't it? There's no problem among
Ruby level, right?
The method I can think of receiving IO instance (T_FILE object) as
arguments is IO::select, which of cource can't handle StringIO.
matz.