1. Computing

Discuss in my forum

Michael Morin

Variables Declared in the Global Scope

By , About.com GuideAugust 31, 2012

Follow me on:

Question:  I declared a variable in the global scope, but I cannot access it from a method.

Answer:  Ruby's idea of the "global scope" is a bit different than in other languages.  Declaring variables in the global scope might not mean what you think it means.

Comments
No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>
Top Related Searches global scope variables

©2013 About.com. All rights reserved.