Ruby (programming language)From Wikipedia, the free encyclopediaJump to navigationJump to searchThis article is about the programming language. For other uses, see Ruby (disambiguation).Not to be confused with Ruby on Rails.RubyParadigmMulti-paradigm: Object-oriented, imperative, functional, reflectiveDesignedbyYukihiro MatsumotoDeveloperYukihiro Matsumoto, et al.First appeared1995; 23 years agoStable release2.5.3 (October 18, 2018; 21 days ago)[±]Typing disciplineDuck, dynamic, strongScopeLexical, sometimes dynamicImplementation languageCOSCross-platformLicenseRuby, GPLv2or 2-clause BSDlicense
Filename extensions.rbWebsiteMajor implementationsRubyMRI, YARV, Rubinius, MagLev, JRuby, MacRuby, RubyMotion, MrubyInfluenced byAda,C++,CLU,Dylan,Eiffel,Lisp,Lua, Perl,Python,SmalltalkInfluencedClojure, CoffeeScript, Crystal, D, Elixir, Falcon, Groovy, Ioke,Julia,Mirah, Nu,Reia, Ring,Rust, SwiftRuby Programmingat WikibooksRubyis a dynamic, interpreted, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumotoin Japan.According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, and Lisp.It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic typesystem and automatic memory management.Contents1Historyo1.1Early concept1.1.1The name "Ruby"o1.2First publicationo1.3Early releases
o1.4Ruby 1.8o1.5Ruby 1.9o1.6Ruby 2.0o1.7Ruby 2.1o1.8Ruby 2.2o1.9Ruby 2.3o1.10Ruby 2.4o1.11Ruby 2.52Table of versions3Philosophy4Features5Semantics6Syntax7Interaction8Exampleso8.1Stringso8.2Collectionso8.3Control structureso8.4Blocks and iteratorso8.5Classes8.5.1Open classeso8.6Exceptionso8.7Metaprogrammingo8.8More examples9Implementations
o9.1Matz's Ruby interpretero9.2Alternate implementationso9.3Platform support10Repositories and libraries11See also12References13Further reading14External linksHistoryEarly conceptMatsumoto has said that Ruby was conceived in 1993. In a 1999 post to the ruby-talkmailing list, hedescribes some of his early ideas about the language:I was talking with my colleague about the possibility of an object-oriented scripting language. I knew Perl (Perl4, not Perl5), but I didn't like it really, because it had the smell of a toy language(it still has).The object-oriented language seemed very promising. I knew Pythonthen. But I didn't like it, because I didn't think it was a true object-oriented language – OO features appeared to be add-on tothe language. As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn't find one. So I decided to make it.