From: ts Date: 2001-08-25T00:20:15+09:00 Subject: [ruby-talk:20293] Re: another new toy >>>>> "B" == Brian Fundakowski Feldman writes: Well, If you want a new toy but this time a really stupid toy, see this pigeon% cat b.rb #!/usr/bin/ruby require 'prop' module Nonew def new(*args) raise "can't use new for this class" end end class A insert Nonew def self.toto "toto" end end class B < A end p B.new p B::toto p A::toto p A.new pigeon% b.rb # "toto" "toto" ./b.rb:6:in `new': can't use new for this class (RuntimeError) from ./b.rb:24 pigeon% I've not yet found an use for this stupid toy :-))) Guy Decoux