Ruby (programming language): Difference between revisions

Content deleted Content added
Improve code example, fix version
No edit summary
Line 7:
* Basic [[object-oriented]] features
* Special object-oriented features:
** [[mixins]]
** [[singleton methods]]
** [[renaming]]
** [[object-specific classes]]
** [[etc.]]
* [[Operator overloading]]
* [[Exception handling]]
* [[Iterator|Iterators]] and [[Closure (programming)|Closures]]
* [[Pearl|Perl]] [[regular expression]] support at [[syntax]] level
* [[computer memory garbage collection|Garbage collection]]
* [[Dynamic loading]] (depending on the architecture)
* High portability (runs on [[Unix]], [[Microsoft Windows]], [[DOS]], OSX, OS/2, [[Amiga]], and many more)
* Distributed under an [[open source]] licenselicence ([[GNU General Public Licence|GPL]] or [[Artistic Licence|Artistic]]).
 
Ruby is purely object-oriented: every bit of data is an object, even basic types. Every function is a method. This is similar to Smalltalk but unlike [[Java programming language|Java]] and Python. With a few exceptions, every name (variable) in a Ruby program hold a reference to an object, not the object itself.