How about this?
c = Class.new
X = Class.new(c)
p X::Y # X::Y
p X.superclass # X::Y
p X.superclass == X::Y # true
(I used const_set instead of Y = c because that created a top-level
I don't know what you need it for but if that helps, there it is :-)
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL
Advancing with Rails January 19-22 Fort Lauderdale, FL *
* Co-taught with Patrick Ewing!
for details and updates!