I've seen magic variables like this used in Ruby. $_
$'
$0
Is there a complete reference for what all of them mean and how they are set?
I've seen magic variables like this used in Ruby. $_
$'
$0
Is there a complete reference for what all of them mean and how they are set?
They are called "global variables" (complete list at the bottom of the page): http://www.rubyist.net/~slagell/ruby/globalvars.html
Their name is global variables
. There are several different references.
You can get a full list by calling the method Kernel#global_variables
puts global_variables
Ruby also includes in the standard library a file called English.rb which provides an in-depth explanation of several global variables.
Finally, here's an other reference.