#Ruby# Introspect (2)
3. Looking at Classes
?
superclass => get the parent of any particular class
?
ancestors => get both superclasses and mixin modules
?
在Ruby1.9中,任何未指定的class都继承自Object,而Object继承自BasicObject,BasicObject无superclass。
?
4. Looking inside Classes
?
?
str = %q{puts "hello".length}eval str # => 5
?
?