From: Massimiliano Mirra Date: 2002-08-05T08:56:33+09:00 Subject: Re: Detecting when an instance variable is created/set On Mon, Aug 05, 2002 at 06:19:20AM +0900, Harry Ohlsen wrote: > > I also don't know why, if put in MonitorVariables, initialize won't be > > called, and needs to be put in a different module. > > I added the code in your Initializer module into MonitorVariables and it > worked OK, so while it seems initialize() seems to need to be handled > separately, it doesn't appear to need to be in a different module. Uhm, did it work for you? Could you post the code? > I still have the issue, though, that with this module included, all of the > instance variables end up being set to "true", rather than to the values they > were actually assigned. > > Any idea why that is and how to fix it? As David pointed out, the code was not saving the return value of the __method and was returning the return value of puts "variables ..." etc. Massimiliano