dist/ember-runtime.js in ember-source-1.10.0.beta.2 vs dist/ember-runtime.js in ember-source-1.10.0.beta.3

- old
+ new

@@ -3,11 +3,11 @@ * @copyright Copyright 2011-2014 Tilde Inc. and contributors * Portions Copyright 2006-2011 Strobe Inc. * Portions Copyright 2008-2011 Apple Inc. All rights reserved. * @license Licensed under MIT license * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 1.10.0-beta.2 + * @version 1.10.0-beta.3 */ (function() { var define, requireModule, require, requirejs, Ember; @@ -4850,11 +4850,11 @@ The core Runtime framework is based on the jQuery API with a number of performance optimizations. @class Ember @static - @version 1.10.0-beta.2 + @version 1.10.0-beta.3 */ if ('undefined' === typeof Ember) { // Create core object. Make it act like an instance of Ember.Namespace so that // objects assigned to it are given a sane string representation. @@ -4877,14 +4877,14 @@ /** @property VERSION @type String - @default '1.10.0-beta.2' + @default '1.10.0-beta.3' @static */ - Ember.VERSION = '1.10.0-beta.2'; + Ember.VERSION = '1.10.0-beta.3'; /** Standard environmental variables. You can define these in a global `EmberENV` variable before loading Ember to control various configuration settings. @@ -11595,13 +11595,15 @@ __exports__.watchKey = watchKey; var handleMandatorySetter = function handleMandatorySetter(m, obj, keyName) { var descriptor = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, keyName); var configurable = descriptor ? descriptor.configurable : true; + var isWritable = descriptor ? descriptor.writable : true; + var hasValue = descriptor ? 'value' in descriptor : true; // this x in Y deopts, so keeping it in this function is better; - if (configurable && keyName in obj) { + if (configurable && isWritable && hasValue && keyName in obj) { m.values[keyName] = obj[keyName]; o_defineProperty(obj, keyName, { configurable: true, enumerable: Object.prototype.propertyIsEnumerable.call(obj, keyName), set: MANDATORY_SETTER_FUNCTION(keyName), @@ -13398,18 +13400,19 @@ Filters the array by the callback. The callback method you provide should have the following signature. `item` is the current item in the iteration. `index` is the integer index of the current item in the iteration. + `array` is the dependant array itself. ```javascript - function(item, index); + function(item, index, array); ``` ```javascript var Hamster = Ember.Object.extend({ - remainingChores: Ember.computed.filter('chores', function(chore, index) { + remainingChores: Ember.computed.filter('chores', function(chore, index, array) { return !chore.done; }) }); var hamster = Hamster.create({ @@ -13434,10 +13437,10 @@ initialize: function (array, changeMeta, instanceMeta) { instanceMeta.filteredArrayIndexes = new SubArray(); }, addedItem: function (array, item, changeMeta, instanceMeta) { - var match = !!callback.call(this, item, changeMeta.index); + var match = !!callback.call(this, item, changeMeta.index, changeMeta.arrayChanged); var filterIndex = instanceMeta.filteredArrayIndexes.addItem(changeMeta.index, match); if (match) { array.insertAt(filterIndex, item); }