Ruby (programming language)
Ruby has been described as a multi-paradigm programming language: it allows procedural programming (defining functions/variables outside classes makes them part of the root, 'self' Object), with object orientation (everything is an object) or functional programming (it has anonymous functions, closures, and continuations; statements all have values, and functions return the last evaluation). It has support for introspection, reflection and metaprogramming, as well as support for interpreter-based threads. Ruby features dynamic typing, and supports parametric polymorphism.
Metaclass
Following the standard definition of metaclasses we can conclude that codice_38 and codice_72 are the only metaclasses in Ruby.
This seems to contradict the correspondence between Ruby and Smalltalk,
since in Smalltalk-80, every class has its own metaclass.
The discrepancy is based on the disagreement between
the codice_68 introspection method in Ruby and Smalltalk. While the map "x ↦ x."codice_68 coincides on terminal objects, it differs in the restriction to classes. As already mentioned above, for a class codice_78, the Ruby expression codice_79 evaluates constantly to codice_38. In Smalltalk-80, if codice_78 is a class then the expression codice_82 corresponds
to the Ruby's codice_83
– which evaluates to the eigenclass of codice_78.