The linked page lists and explains global Ruby "dollar" variables, such as:
-
$:(load path) -
$*(ARGV) -
$?(Last exit status) -
$$(PID) -
$~(MatchDatafrom last successful match) - ...and many more you'll need when reading weird code.
Regex
-
$~(lastMatchData) -
$1 $2 $3 $4(match groups from the last pattern match) -
$&(last matched string) -
$+(last match group) - `$`` (the string before the last match)
-
$'(the string after the last match
See this extensive list of variables Show archive.org snapshot .
Posted by Arne Hartherz to makandra dev (2013-07-17 10:19)