From: Thufir Date: 2007-11-07T13:55:01+09:00 Subject: Re: dragons and factorials (keyboard input) On Nov 6, 4:12 pm, Todd Benson wrote: [...] > You want to avoid method's being instantiated per object? You can > attach the method directly to a class... For instance: C:\code> C:\code> C:\code>type factorial.rb def fact(n) if n <= 1 1 else n * fact(n - 1) end end C:\code> C:\code> I think that factorial would best be a module, as module's cannot be instantiated. However, I would also want to prevent factorial from being extended so that nothing "from" it can be instantiated. The idea of a factorial "object", or an object which descends from it, strikes me as ludicrous. Is this un-ruby-ish thinking? -Thufir