{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/7369","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/7369/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/7369/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/7369/events","html_url":"https://github.com/nodejs/node/pull/7369","id":161737722,"number":7369,"title":"repl: Enable tab completion for global properties when useGlobal is false","user":{"login":"lance","id":15952,"avatar_url":"https://avatars.githubusercontent.com/u/15952?v=3","gravatar_id":"","url":"https://api.github.com/users/lance","html_url":"https://github.com/lance","followers_url":"https://api.github.com/users/lance/followers","following_url":"https://api.github.com/users/lance/following{/other_user}","gists_url":"https://api.github.com/users/lance/gists{/gist_id}","starred_url":"https://api.github.com/users/lance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lance/subscriptions","organizations_url":"https://api.github.com/users/lance/orgs","repos_url":"https://api.github.com/users/lance/repos","events_url":"https://api.github.com/users/lance/events{/privacy}","received_events_url":"https://api.github.com/users/lance/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/repl","name":"repl","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-22T17:13:34Z","updated_at":"2016-06-22T23:21:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/7369","html_url":"https://github.com/nodejs/node/pull/7369","diff_url":"https://github.com/nodejs/node/pull/7369.diff","patch_url":"https://github.com/nodejs/node/pull/7369.patch"},"body":"##### Checklist\r\n\r\n- [X] `make -j4 test` (UNIX) or `vcbuild test nosign` (Windows) passes\r\n- [X] a test and/or benchmark is included\r\n- [X] the commit message follows commit guidelines\r\n\r\n\r\n##### Affected core subsystem(s)\r\nrepl\r\n\r\n##### Description of change\r\nWhen `useGlobal` is false, tab completion in the repl does not enumerate\r\nglobal properties. Instead of just setting these properties blindly on\r\nthe global context, e.g.\r\n\r\n    context[prop] = global[prop]\r\n\r\nUse `Object.defineProperty` and the property descriptor found on\r\n`global` for the new property in `context`.\r\n\r\nAlso addresses a previously unnoticed issue where `console` is writable\r\nwhen `useGlobal` is false.\r\n\r\nRef: https://github.com/nodejs/node/issues/7353"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/227906357","html_url":"https://github.com/nodejs/node/pull/7369#issuecomment-227906357","issue_url":"https://api.github.com/repos/nodejs/node/issues/7369","id":227906357,"user":{"login":"princejwesley","id":1622515,"avatar_url":"https://avatars.githubusercontent.com/u/1622515?v=3","gravatar_id":"","url":"https://api.github.com/users/princejwesley","html_url":"https://github.com/princejwesley","followers_url":"https://api.github.com/users/princejwesley/followers","following_url":"https://api.github.com/users/princejwesley/following{/other_user}","gists_url":"https://api.github.com/users/princejwesley/gists{/gist_id}","starred_url":"https://api.github.com/users/princejwesley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/princejwesley/subscriptions","organizations_url":"https://api.github.com/users/princejwesley/orgs","repos_url":"https://api.github.com/users/princejwesley/repos","events_url":"https://api.github.com/users/princejwesley/events{/privacy}","received_events_url":"https://api.github.com/users/princejwesley/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T23:21:05Z","updated_at":"2016-06-22T23:21:05Z","body":"@lance This solution has some side effects!\r\n\r\n```js\r\nnode 🙈 ₹ git:(master)  cat ~/Desktop/test.js\r\nlet repl = require('repl')\r\nrepl.start({useGlobal: false})\r\nnode 🙈 ₹ git:(master)  ./node !$\r\n./node ~/Desktop/test.js\r\n> [] instanceof Array\r\nfalse\r\n> /vm/ instanceof RegExp\r\nfalse\r\n>\r\n```"}}
{"actor":{"display_login":"princejwesley"}}