Add bizarro _.create test.

This commit is contained in:
John-David Dalton
2016-10-05 16:11:10 -07:00
parent 6e8c0de1ff
commit 1665e5cbff
2 changed files with 16 additions and 8 deletions

View File

@@ -85,9 +85,9 @@
setProperty(Object, '_create', Object.create);
setProperty(Object, 'create', (function() {
function object() {}
return function(prototype) {
if (prototype === Object(prototype)) {
object.prototype = prototype;
return function(proto) {
if (proto === Object(proto)) {
object.prototype = proto;
var result = new object;
object.prototype = undefined;
}