repl: do not insert duplicates into completions
authorMaciej Małecki <me@mmalecki.com>
Mon, 11 Nov 2013 23:03:29 +0000 (00:03 +0100)
committerNathan Rajlich <nathan@tootallnate.net>
Mon, 11 Nov 2013 23:45:09 +0000 (15:45 -0800)
commit568072ceae5566c4e3e14cef077538d2f454ee33
tree05c99fd6c0a89254b6e70a8ba36818bd8ab74045
parent201098535443ef6588b0fd176a425fdf3213ee70
repl: do not insert duplicates into completions

Fix invalid `hasOwnProperty` function usage.

For example, before in the REPL:

```
> Ar<Tab>
Array

Array        ArrayBuffer
```

Now:

```
> Ar<Tab>
Array

ArrayBuffer
```

Fixes #6255.
Closes #6498.
lib/repl.js
test/simple/test-repl-tab-complete.js