From: "David A. Black" Date: 2008-07-27T20:06:28+09:00 Subject: Re: local constant Hi -- On Sun, 27 Jul 2008, Phlip wrote: > Marc Heiler wrote: > >>> Read my verbiage again. >> >> Not trying to nitpick but I agree with Robert Dober about the formulation: >> >>>> If you called aidy() twice, the constant would re-assign, and it therefor >>>> would not be constant. > > The quote depends on magically suspending the Ruby error message. Hence it > does not say out-of-the-box Ruby cannot reassign. > > (We get reassignments, with their warnings, all the time in Rails, partly due > to its Magic Loader facility...) The magic loading shouldn't lead to those errors. It only does the magic loading for unresolved constant references, and once it loads the necessary file, any further references to the constant won't be unresolved. Maybe you've got some rogue "load" commands somewhere. David -- Rails training from David A. Black and Ruby Power and Light: * Advancing With Rails August 18-21 Edison, NJ * Co-taught by D.A. Black and Erik Kastner See http://www.rubypal.com for details and updates!