On 30.04.2011 21:25, I=F1aki Baz Castillo wrote:
> Hi, assinging a value to a constant within a method is not allowed
> (SyntaxError:: dynamic constant assignment) but I can use
> self.class.const_set within a method. Which is the difference?

You described the difference pretty accurately.  It is quite common for=20
Ruby to forbid doing bad things directly while still leaving a way to do =

it nevertheless (just think of private methods and #send).

Kind regards

	robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/