Somehow, just not documenting the constants leaves me unsatisfied, 
though I admit that this is more of a theoretical than a practical matter.

Given that constants aren't actually required to be constant, anyway, 
I'm tempted to use class variables for the private ones instead...  In 
his response, murphy was kind enough to provide benchmarks showing the 
performance hit I'd take if I did this.

	David

Nathan Weizenbaum wrote:
> I believe there isn't a way, but I don't think it's really necessary. 
> Just exclude the constants from the documentation, and no one will use them.
> 
> - Nathan
> 
> On 5/7/07, *David Flanagan* <david / davidflanagan.com 
> <mailto:david / davidflanagan.com>> wrote:
> 
>     Hi,
> 
>     As far as I can tell (and I hope I'm not overlooking something
>     embarrassingly obvious) there is no way to define private constants in
>     Ruby.  It seems to me that class implementations often benefit from the
>     use of constants, but there is no need to expose many of these constants
>     as part of the public API.
> 
>     Has the community settled on any kind of pattern for dealing with this?
> 
>     The only one I can think of is to define methods whose names begin with
>     capital letters and therefore look like constants.  I don't like the
>     performance implications of that, however.
> 
>     Thank you for your insight!
> 
>             David Flanagan
> 
>