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)
$foo = 500
- to print the global variable (gprint.rb)
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.