----- Original Message ----- 
From: "Jim Freeze" <jim / freeze.org>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
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