Aliasing Global Variables in Ruby
Posted by Jeremy Voorhis Thu, 05 Jul 2007 22:10:00 GMT
And while I am becoming quite the language lawyer, I should mention that Ruby’s alias statement treats global variables quite differently from other kinds of variables.
When aliasing global symbols, the global variable itself is aliased and not evaluated. The result is a true alias, not a copy, so you cannot modify the global and its alias independently.
This feature most likely exists solely for English.rb in the standard library. This being the case, see that file for examples.
