It's stated in the tutorial that "If you want to make a variable global from inside a method or class, just start it with a $, like so: $matz." However, in my code, I put the $ in front of the variable that wasn't in the class and it still worked. In fact, it wouldn't work without it. Is the instructions/tutorial wrong about this?
Edit I know that it says that "...you just define the variable
outside of any method or class, and voilà! It's global...." However, wouldn't that mean that the code that I am to fix is correct already? Isn't it already being defined outside of the class?
class MyClass my_variable = "Hello!" end puts $my_variable