Plough => Ruby

Journey through ruby

Cryptic Global Variables in Ruby

Do you know what $! means in Ruby?

Years ago, I was discussing some issue regarding GemCutter (now that makes it ancient in programming age), and we were talking about global variables in Ruby, for example, $; and $/. At the time, we couldn’t really find a place to look them up, even Google isn’t very effective given the nature of the query.

Anyways, while looking through Ruby’s standard library, I found the file English.rb. This library has English names for all the cryptic global variables. For example: $ERROR_INFO represents $!.

If you ever have to look up the English names, which I suggest you do as it makes code easier to read, just refer to that file.