Q:

Ractive.js Pattern Indirect Observer Reports Same Value

I use Ractive.js to bind a javascript object and an HTML form. My object looks like this:
entity: {
  id: 'some id'
  type: 'a type'
  names: [
     {
       locale: 'en',
       name: 'some name'
     },
     {
       locale: 'tr',
       name: 'some translation'
     }
  ]
}

I'd like to subscribe for name updates. I register for updates in the following way:
ractive.observe({
  // indirect observer
  'entity': function(newValue, oldValue, key) {
    console.log(key + ' is changed from ' + oldValue + ' to ' + newValue);
  },
  // direct observer
  'entity.names.*': function(newValue, oldValue, key, index) { 
     console.log(key + ' is changed from ' + oldValue + ' to ' + newValue + ' and index is ' + index);
  }
}

However, oldValue and newValue is always the same (equal to the most recent value of observed pattern) for both observers above.
This behavior is expected for direct observer according to their documentation. However, indirect observer should provide different values.

Example with 0.8.0-edge: http://jsfiddle.net/0mdjdq4u/5/
Example with 0.7.3: http://jsfiddle.net/0mdjdq4u/6/

A:

For v0.7.3 on lines 2648 and 2743 the values are copied into pattern observer. However, that copy is a shallow copy. So if the actual value is updated, then the values in the observer are updated, even though we expect pattern obverser to keep value before the update.
More discussion on this could be found here.

