O'Reilly logo

Ruby Under a Microscope by Pat Shaughnessy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Method Lookup and Constant Lookup

image with no caption

Inside of Ruby, modules are classes.

As we saw in Chapter 5, classes play an important role in Ruby, holding method definitions and constant values, among other things. We also learned how Ruby implements inheritance using the super pointer in each RClass structure.

In fact, as your program grows, you might imagine it organized by class and superclass, creating a kind of giant tree structure. At the base is the Object class (or, actually, the internal BasicObject class). This class is Ruby’s default superclass, and all of your classes appear somewhere higher up in the tree, branching out in different directions. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required