RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Cryptic Ruby Global Variables and Their Meaning

How many times have you looked at some ruby code and found strange variable names (eg. $0, $:, etc) and wondered what they meant? Well here’s an explanation

Comments

These globals only seem cryptic if you haven’t spent years coding in Perl :)

They are called “special variables” and inherited from the Perl world, not exactly “cryptic global variables”.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in