X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail From: Brian Candler Newsgroups: comp.lang.ruby Subject: Re: Using variables in modules Date: Sun, 3 Apr 2011 15:30:29 -0500 Organization: Service de news de lacave.net Lines: 20 Message-ID: <99e0c41327bc69f08a043f08d9fd615c@ruby-forum.com> References: <1301790250.3173.40.camel@AMD64X2.fritz.box> <20110403103615.1068791b@user-GA-MA785GM-US2H> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1301862657 73891 65.111.164.187 (3 Apr 2011 20:30:57 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Sun, 3 Apr 2011 20:30:57 +0000 (UTC) In-Reply-To: <20110403103615.1068791b@user-GA-MA785GM-US2H> X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 380862 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: <99e0c41327bc69f08a043f08d9fd615c@ruby-forum.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2214 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/.