Obvious/pipette — pull request #32 by felthy (2013-04-01 04:21:24+00:00)
Title: Use Object.defineProperty() when overriding properties from a frozen prototype

Somewhere between NodeJS v0.8.18 and v0.10.2, the behaviour of Object.freeze() appears to have changed. If you upgrade to the latest NodeJS and run the pipette unit tests `npm test` then tests fail:

```bash
$ node --version
v0.10.2
$ npm test

> pipette@0.9.1 test pipette
> node test/test.js

pipette/lib/cat.js:66
this.onEnd = this.onEnd.bind(this);
^
TypeError: Cannot assign to read only property 'onEnd' of #
at new State (pipette/lib/cat.js:66:14)
at new Cat (pipette/lib/cat.js:236:26)
at constructor (pipette/test/cat.js:44:7)
at Object.test (pipette/test/cat.js:427:3)
at Object. (pipette/test/test.js:4:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
```

I wasn't able to find any documentation on whether `Object.freeze(