Scoping of special variables

Hello,

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

Regards,

Carter.

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:

http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Variables_and_Constants

  • j

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs