From: John Carter Date: 2002-01-29T06:40:10+09:00 Subject: What is special about TCPServer? I have a wee problem inheriting from TCPServer This... ======================= class Foofy def initialize(x,y) end end Foofy.new ============== produces.... ========================== InstallerServer.rb:6:in `initialize': wrong # of arguments(0 for 2) (ArgumentError) from InstallerServer.rb:6:in `new' from InstallerServer.rb:6 ========================== No problem. And this ====================== class Foofy def initialize(x,y) end end class Fifi < Foofy def initialize super( 1, 2) end end Fifi.new =========================== Compiles and runs no problem. But this.... ======================== require 'socket' class Fifi < TCPServer def initialize super( 'localhost', 9020) end end Fifi.new ========================== produces.... ========================== ruby InstallerServer.rb InstallerServer.rb:10:in `new': wrong # of arguments (0 for 1) (ArgumentError) from InstallerServer.rb:10 =========================== Why? Problem occurs in ruby-1.6.5 and 1.6.6 John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Zeitgeist shutting down for corrective maintenance, please log off.