From: Nikos Kanellopoulos Date: 2007-08-14T17:23:37+09:00 Subject: Re: what is "dynamic constant assignment" 2007/8/14, sean liu : > hi, all > > today i defined a class like this: > class C > AB = 10 > def self.set(value) > AB = value > end > end > then i got this error: SyntaxError: compile error (irb):10: dynamic constant > assignment. > Constants can be changed after initialization, but what does this error > mean? > Any explanations will be appreciated. > Variable AB is a contant, because it starts with a capital letter. You can only assign a contant value (or expression) to it, once.