I'm looking for a simple and short solution/library that does this:

a = []

def a.modified
puts "Array a changed"
end

a << 'x'
puts a
a[0] = 'y'
puts a

----OUTPUT----
Array a changed
x
Array a changed
y

-- 
Posted via http://www.ruby-forum.com/.