Hi all,

Please consider this example:


class A=20
  def self.inherited(subclass)
    puts "A was inherited by #{subclass}"
  end
end

class B < A
  puts "Definition of #{self}"
end

C =3D Class.new(A) do
  puts "Definition of #{self}"
end


When run, the output is

A was inherited by B
Definition of B
Definition of #<Class:0x100124e80>
A was inherited by #<Class:0x100124e80>

So, the inherited callback was called *before* the class body in the =
"static" subclass B, but *after* the code in the block passed to =
Class.new for the dynamic subclass C. Is this a bug?

My question is: why is this so? Shouldn't the two ways of creating =
subclasses be equivalent?

Kind regards
Jacob=