class BasicObject

BasicObject is the parent class of all classes in Ruby. In particular, BasicObject is the parent class of class Object, which is itself the default parent class of every Ruby class:

class Foo; end
Foo.superclass    # => Object
Object.superclass # => BasicObject

BasicObject is the only class that has no parent:

BasicObject.superclass # => nil

Class BasicObject can be used to create an object hierarchy (e.g., class Delegator) that is independent of Ruby’s object hierarchy. Such objects:

A variety of strategies can be used to provide useful portions of the Standard Library in subclasses of BasicObject:

What’s Here

These are the methods defined for BasicObject: