From: mortee Date: 2007-11-06T23:25:31+09:00 Subject: Re: string to symbol Fernando Cacciola wrote: > mortee wrote: >> If you wish. Note that you can't create constants from within methods. >> > Oh... why is that? I don't know the exact reason. I guess that constants are intended to be assigned during the initialization phase of an application, while modules and classes are defined. Methods are primarily used during the actual normal operation of the program. If you absolutely need to assign a constant from a method, e.g. because you define a method for doing some meta-programming magic, and it needs to create constants too, you can use Module#const_set. mortee