Module: English (Ruby 2.3.2)
Description: Module : English - Ruby 2.3.2

- Home
- Core 2.3.2
- Std-lib 2.3.2
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- English.rb

### Class/Module Index

Quicksearch

- English
- Object

No matching classes.

# English

Include the English library file in a Ruby script, and you can reference the global variables such as VAR{$_} using less cryptic names, listed in the following table.% vref{tab:english}.

Without 'English':

    $\ = ' -- '
    "waterbuffalo" =~ /buff/
    print $', $$, "\n"

With English:

    require "English"

    $OUTPUT_FIELD_SEPARATOR = ' -- '
    "waterbuffalo" =~ /buff/
    print $POSTMATCH, $PID, "\n"

Below is a full list of descriptive aliases and their associated global variable:

$ERROR_INFO

  $!

$ERROR_POSITION

  $@

$FS

  $;

$FIELD_SEPARATOR

  $;

$OFS

  $,

$OUTPUT_FIELD_SEPARATOR

  $,

$RS

  $/

$INPUT_RECORD_SEPARATOR

  $/

$ORS

  $\

$OUTPUT_RECORD_SEPARATOR

  $\

$INPUT_LINE_NUMBER

  $.

$NR

  $.

$LAST_READ_LINE

  $_

$DEFAULT_OUTPUT

  $>

$DEFAULT_INPUT

  $<

$PID

  $$

$PROCESS_ID

  $$

$CHILD_STATUS

  $?

$LAST_MATCH_INFO

  $~

$IGNORECASE

  $=

$ARGV

  $*

$MATCH

  $&

$PREMATCH

  $`

$POSTMATCH

  $'

$LAST_PAREN_MATCH

  $+