Scoping of special variables


I am somewhat new to ruby and I was curious about certain details of the
language. Do special variables have global or local scope?



If it starts with a $, it’s global. I suppose you mean special
variables like $: - they’re global as well.

– Matma R.

take a look here:

Ruby Programming/Syntax/Variables and Constants - Wikibooks, open books for an open world

  • j