Official documentation for system variables:
http://www.ruby-doc.org/stdlib-2.0/libdoc/English/rdoc/English.html
Many special Ruby variables are accessible through methods in various modules and classes, which hides the fact that the variable is what contains the value. For example, lineno , available in IO and inherited by a file, is the line number of the last line read by the I / O stream. He relies on $/ and $.
The "English" module provides long versions of critical variables, which makes it more readable. Using critical variables is not as idiomatic in Ruby as it is in Perl, so they are more curious when you come across them.
They come from a variety of sources: most, if not all, are directly from Perl, but Perl inherited them from sed, awk, and the rest of the kitchen code collection. (This is actually a great language.)
There are other variables defined by classes such as Regexp , which defines variables for the pre and post match, as well as for captures. This is from the documentation:
$~ is equivalent to ::last_match; $& contains the complete matched text; $` contains string before match; $' contains string after match; $1, $2 and so on contain text matching first, second, etc capture group; $+ contains last capture group.
Although Ruby defines short, cryptic versions of variables, it is recommended that you use require "English" to provide long names. This is readability, which translates into long-term ease of maintenance.