substack/node-editor — pull request #4 by brainss (2012-07-26 20:53:48+00:00)
Title: fix setRaw() execution context

The execution context of `setRawMode()` loses it's binding to `process.stdin`. I'm not sure why, I couldn't find anything in ecma-262, but that's probably my own error.

Compare these two:
```
node -e "var tty = require('tty'); (process.stdin.setRawMode || tty.setRawMode)(true)"
node -e "var tty = require('tty'); (process.stdin.setRawMode || tty.setRawMode).call(process.stdin, true)"
```

I'm using node v0.8.3