Ruby

Open Source

by Ruby

Provided by Ruby

Not yet rated
Platform
Windows / Linux / macOS
Pricing
Open Source
Account required
No
Ads
None
Last verified
22 hours ago
Developer
Ruby
Official URL

Overview

Ruby is a general-purpose programming language created by Yukihiro Matsumoto, known as Matz, and first released publicly in 1995. He blended ideas from Perl, Smalltalk, Eiffel, Ada and Lisp to make a language that balances functional and imperative programming. It is free to use, copy, modify and distribute, and much of its popularity came through the Ruby on Rails web framework.

In Ruby everything is an object, including numbers, so every value has methods. The language is flexible: operators are ordinary methods that can be redefined, and blocks let you attach a closure to any method call. Classes inherit from a single parent, with modules mixed in to share behaviour. Variables need no declarations, exceptions are handled in the language, and memory is managed by a mark-and-sweep garbage collector. Extensions can be written in C.

The reference interpreter, often called MRI or CRuby, is written in C. Other implementations include JRuby on the Java virtual machine, TruffleRuby on GraalVM and the small embeddable mruby. On Linux Ruby is usually installed from the distribution's package manager or with a version manager such as rbenv or RVM, which are also the suggested route on macOS. Windows users are pointed to RubyInstaller. It can also be compiled from source.

Features

  • Everything is an object, including numbers and other basic types
  • Blocks that attach a closure to any method call
  • Single inheritance with modules as mixins
  • Operators are methods and can be redefined
  • Exception handling built into the language
  • Mark-and-sweep garbage collection
  • C extension API and dynamically loaded extension libraries
  • Threading that works the same on every supported platform
  • Several implementations, including CRuby, JRuby, TruffleRuby and mruby

Privacy

See the official privacy policy. Ruby is a locally installed language runtime.

Pros & Cons

Pros

  • Free to use, copy, modify and distribute
  • Readable syntax with no variable declarations
  • Runs on Linux, macOS, Windows and many UNIX variants
  • Choice of interpreters for different runtimes such as the JVM
  • Backed by the Ruby on Rails ecosystem for web work

Cons

  • macOS and Linux installs often rely on third-party version managers
  • Windows needs the separate RubyInstaller project
  • So much flexibility means core behaviour can be redefined, which can surprise newcomers
  • No multiple inheritance, by design

Community Reviews (0)

No written reviews yet — be the first to rate this tool.

Similar Tools

  • Interpreters · Python

    Runs Python programs and scripts.

    Not yet rated
    Open Source Android iOS
  • Interpreters · PHP.net

    Runs PHP scripts from the command line.

    Not yet rated
    Open Source Windows Linux