From: 7stud -- Date: 2009-07-20T15:52:38+09:00 Subject: Re: Ruby Object listener? class MyHash < Hash def [](key) notify super end def []=(key, val) notify super end def notify puts "something happened" end end h = MyHash["a", 10, "b", 20] h["c"] = 30 val = h["c"] --output:-- something happened something happened -- Posted via http://www.ruby-forum.com/.