From: Brian Candler Date: 2011-08-15T21:52:41+09:00 Subject: Re: class inheritance and class constants "IƱaki Baz Castillo" wrote in post #1016621: > ------------------------ > class A > HELLO = "Hello I'm A" > > def hello > puts HELLO > end > end > > class B < A > HELLO = "Hello I'm B" > > def hello2 > puts HELLO > end > end Change puts HELLO to puts self.class::HELLO and it should work the way you want. Ruby's constant resolution is static, unless you force it to be dynamic this way. -- Posted via http://www.ruby-forum.com/.