From: Juozas Gaigalas Date: 2007-01-16T02:06:34+09:00 Subject: Re: Array#modified >> > class Changed > def initialize(obj, &changed) > @obj = obj > @changed = changed > end > > def method_missing(id, *a, &b) > obj_before = @obj.clone > @obj.__send__(id, *a, &b) > if obj_before != @obj > @changed[@obj, id, a, b] > end > end > end I like this solution because it's short. However, it requires cloning the array every time a method is invoked on it, it seems that it would slow it down too much for my needs. I'm not sure. I think I'll google for "ruby event framework" as Marc suggested. -- Posted via http://www.ruby-forum.com/.