"Ruby" (External Evaluation System)
Details

- Ruby Version 2.0 and higher is supported.
- To configure Ruby for use in the Wolfram Language, follow the instructions from the Configure Ruby for ExternalEvaluate workflow.
ExternalEvaluate Usage

- ExternalEvaluate["Ruby",code] executes the code string in a Ruby REPL and returns the results as a Wolfram Language expression.
- ExternalEvaluate["Ruby""String",code] executes the code string in a Ruby REPL and returns the output as a Wolfram Language string.
Data Types

- The following Ruby built-in types are supported:
-
Array List array of values BigDecimal Real arbitrary-precision real number Bignum Integer arbitrary-sized integer boolean TrueFalse Boolean values Complex Complex complex number Fixnum Integer machine-size number Float Real real-valued number Hash Association associative array nil Null null value Rational Rational rational number String String sequence of character values
Examples
open allclose allBasic Examples (3)
Evaluate 2+2 in Ruby and return the result:
Type > and select Ruby from the drop-down menu to get a code cell that uses ExternalEvaluate to evaluate: