From: spiralofhope Date: 2011-04-04T02:37:04+09:00 Subject: Re: Using variables in modules On Sun, 3 Apr 2011 09:30:28 +0900 Stefan Salewski wrote: > Can I define a variable in a module, and access and redefine it later? > Something like > > module Gravity > > G = 9.81 > > end > > puts Gravity::G > > 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.