>>>>> "B" == Brian Fundakowski Feldman <green / FreeBSD.org> 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
#<B:0x401a6248>
"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