Ruby programming language
Ruby is a reflective, object-orientedprogramming language. It combines syntax inspired by Perl with Smalltalk-like object-oriented features, and also shares some features with Python, Lisp, Dylan and CLU. Ruby is a single-pass interpreted language. Its main implementation is free software distributed under an open-source license.
Ruby is object-oriented: every bit of data is an object, even classes and types that many other languages designate as primitives (such as
integers, booleans, and "nil"). Every
function is a
method. Named values (variables) always designate references to objects, not the objects themselves. Ruby supports
inheritance with
dynamic dispatch,
mixins and
singleton methods (belonging to, and defined for, a single
instance rather than being defined on the class). Though Ruby does not support
multiple inheritance, classes can import
modules as mixins. Procedural syntax is supported, but everything done in Ruby procedurally (that is, outside of the scope of a particular object) is actually done to an Object instance named 'main'. Since this class is parent to every other class, the changes become visible to all classes and objects.
Ruby has been described as a
multi-paradigm programming language: it allows you to program procedurally (defining functions/variables outside classes makes them part of the root, 'self' Object), with object orientation (everything is an object) or
functionally (it has anonymous functions,
closures, and
continuations; statements all have values, and functions return the last evaluation). It has support for
introspection,
reflection and
meta-programming, as well as support for
threads. Ruby features
dynamic typing, and supports
parametric polymorphism.
According to the Ruby
FAQ, "If you like
Perl, you will like Ruby and be right at home with its syntax. If you like
Smalltalk, you will like Ruby and be right at home with its semantics. If you like
Python, you may or may not be put off by the huge difference in design philosophy between Python and Ruby/Perl."