emberjs/ember.js — pull request #4988 by crismali (2014-06-06 15:12:40+00:00)
Title: Made mandatory setter function return a function that calls "Ember.set" for you

I've changed `Ember.MANDATORY_SETTER_FUNCTION` to return a function that calls `Ember.set` for you instead of throwing an error that tells you to call `Ember.set`. I think this is an improvement for a few reasons.

This way Ember does what you mean, which it should because it has all of the information necessary on hand to do so. Also, while the error that was thrown had a descriptive message, it could occur in confusing ways.

For instance, if you mutate a plain object before it's rendered to the page and mutate again after it's rendered, you'll only get the error on the second mutation. [jsbin example here](http://jsbin.com/dedom/1/edit?js,console,output). The error only being thrown the second time is extremely confusing if you don't know Ember is defining setters (or if you don't even know that you _can_ do that in JavaScript), because why would `foo.bar = 'baz'` work the first time but then throw an error the second time?

Alternatively, Ember could throw an error whenever you try to render a non-Ember object to the page if the setter calling set is too much magic.