From: "Hal E. Fulton" Date: 2003-05-09T07:07:36+09:00 Subject: Re: Can a global be a constant? ----- Original Message ----- From: "Jim Freeze" To: "ruby-talk ML" Sent: Thursday, May 08, 2003 4:45 PM Subject: Can a global be a constant? > I just noticed this (after 2 yrs). It appears that a > capitalized global is not considered a constant. > > $D = true # ok > $D = false # ok > F = true # ok > F = false # -:4: warning: already initialized constant F > > Why is this? The first character is less like a prefix than like a part of the name. If it starts with a $, it doesn't start with a capital letter. OTOH, constants have a big scope anyway. Did you want to keep the scope across files or something? Hal