Fix wrong call to the underlying method when checking if an object is frozen #490

Merged
merged 1 commit into from Jul 18, 2015

Projects

None yet

2 participants

@astorije
Member

No description provided.

@keithamus
Member

Ooops, good call. Missed that in the PR. Thanks @astorije

@keithamus keithamus merged commit 0d5e87a into chaijs:master Jul 18, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@astorije
Member

For the record, here is why this buggy version passes the tests:

> var v = { foo: "bar" }
undefined
> Object.isSealed(v)
false
> Object.isFrozen(v)
false
> Object.freeze(v)
{ foo: 'bar' }
> Object.isSealed(v)
true
> Object.isFrozen(v)
true

So if you are frozen, you are sealed.

(Note that the opposite is not true:

> var v2 = { foo: "bar" }
undefined
> Object.isSealed(v2)
false
> Object.isFrozen(v2)
false
> Object.seal(v2)
{ foo: 'bar' }
> Object.isSealed(v2)
true
> Object.isFrozen(v2)
false

)

@astorije
Member

@keithamus, can you quickly release version 3.1.1 to make sure anyone who gladly switched to version 3.1.x to have these methods does not fall in this bug?

@astorije astorije deleted the astorije:patch-2 branch Jul 18, 2015
@marekventur marekventur referenced this pull request in Gamevy/pixi-packer Dec 14, 2015
Merged

Update "chai" to version ^3.4.1 #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment