From: Brian Candler Date: 2011-04-04T05:30:29+09:00 Subject: Re: Using variables in modules spiralofhope wrote in post #990694: > On Sun, 3 Apr 2011 09:30:28 +0900 > Stefan Salewski wrote: > >> >> Gravity::G = 9.8102 # we have done a more precise measurement >> >> puts Gravity::G >> >> works, but gives a warning. > > You're not defining a variable. You're defining a constant with the > capital G. Use lowercases and this should work just fine. Before handing out advice I suggest you test it first. Hint: if you just change "G" to "g" in his original code, it will not work. -- Posted via http://www.ruby-forum.com/.