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
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!
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