From: fedzor Date: 2008-06-15T01:35:40+09:00 Subject: Re: fire event when the value of a variable is changed On Jun 13, 2008, at 11:36 PM, Avdi Grimm wrote: > On Fri, Jun 13, 2008 at 10:04 PM, fedzor wrote: >> a = 5 >> a.trace_var {|new| puts "a was changed to '#{new}'" } > > Did you actually try this? And if so, on what version of Ruby? > > According to RI and the results of my own experimentation, trace_var > is called like so: > > trace_var(:$a) {|value| ...} I tried it a while ago... but not *Exactly* that line of code... sorry! -------------------------------------------------------| ~ Ari seydar: it's like a crazy love triangle of Kernel commands and C code