From: di vi Date: 2010-02-19T16:02:52+09:00 Subject: Global variables usage I declared two files.One to hold the value of a global variable.And the other to print it. 1)to hold variables (var.rb) Code: $foo = 500 2) to print the global variable (gprint.rb) Code: loop do puts $foo end But when I print it ,I get the value "nil" being printed not 500.What could be the problem? I did read some tutorials online but dint help.Could some please tell why I am not able to access the global variable between two .rb files in the same folder? Please let me know. -- Posted via http://www.ruby-forum.com/.