Bump to v3.8.0.

This commit is contained in:
jdalton
2015-04-29 21:07:42 -07:00
parent 5eb8db31d7
commit d7b2bedafc
58 changed files with 300 additions and 194 deletions

View File

@@ -4,7 +4,7 @@ import isNative from '../lang/isNative';
import keys from '../object/keys';
/** Native method references. */
var preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions;
var preventExtensions = isNative(preventExtensions = Object.preventExtensions) && preventExtensions;
/** Used as `baseAssign`. */
var nativeAssign = (function() {
@@ -14,12 +14,19 @@ var nativeAssign = (function() {
//
// Use `Object.preventExtensions` on a plain object instead of simply using
// `Object('x')` because Chrome and IE fail to throw an error when attempting
// to assign values to readonly indexes of strings in strict mode.
var object = { '1': 0 },
func = preventExtensions && isNative(func = Object.assign) && func;
try { func(preventExtensions(object), 'xo'); } catch(e) {}
return !object[1] && func;
// to assign values to readonly indexes of strings.
var func = preventExtensions && isNative(func = Object.assign) && func;
try {
if (func) {
var object = preventExtensions({ '1': 0 });
object[0] = 1;
}
} catch(e) {
// Only attempt in strict mode.
try { func(object, 'xo'); } catch(e) {}
return !object[1] && func;
}
return false;
}());
/**