{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/2163","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/2163/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/2163/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/2163/events","html_url":"https://github.com/nodejs/io.js/pull/2163","id":94503146,"number":2163,"title":"REPL bug fixes","user":{"login":"thefourtheye","id":696611,"avatar_url":"https://avatars.githubusercontent.com/u/696611?v=3","gravatar_id":"","url":"https://api.github.com/users/thefourtheye","html_url":"https://github.com/thefourtheye","followers_url":"https://api.github.com/users/thefourtheye/followers","following_url":"https://api.github.com/users/thefourtheye/following{/other_user}","gists_url":"https://api.github.com/users/thefourtheye/gists{/gist_id}","starred_url":"https://api.github.com/users/thefourtheye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thefourtheye/subscriptions","organizations_url":"https://api.github.com/users/thefourtheye/orgs","repos_url":"https://api.github.com/users/thefourtheye/repos","events_url":"https://api.github.com/users/thefourtheye/events{/privacy}","received_events_url":"https://api.github.com/users/thefourtheye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/repl","name":"repl","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-11T19:58:41Z","updated_at":"2015-07-24T16:51:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/io.js/pulls/2163","html_url":"https://github.com/nodejs/io.js/pull/2163","diff_url":"https://github.com/nodejs/io.js/pull/2163.diff","patch_url":"https://github.com/nodejs/io.js/pull/2163.patch"},"body":"There are four bug fixes.\r\n\r\n#### 1. Better line continuation feature\r\n\r\nAs it is, REPL doesn't honour the line continuation feature very well.\r\nThis patch\r\n\r\n 1. keeps track of the beginning of the string literals and if they\r\n    don't end or current line doesn't end with line continuation, then\r\n    error out.\r\n\r\n 2. monitors if the line continuation character is used without the\r\n    string literal and errors out if that happens.\r\n\r\n---\r\n\r\n#### 2. Removing `undefined` when unknown REPL command is used\r\n\r\nWhen an invalid REPL keyword is used, we actually print `undefined` as\r\nwell in the console.\r\n\r\n    > process.version\r\n    'v2.3.4'\r\n    > .invalid_repl_command\r\n    Invalid REPL keyword\r\n    undefined\r\n    >\r\n\r\nThis patch prevents printing `undefined` in this case.\r\n\r\n    > process.version\r\n    'v2.3.5-pre'\r\n    > .invalid_repl_command\r\n    Invalid REPL keyword\r\n   >\r\n\r\n---\r\n\r\n#### 3. preventing REPL crash with inherited properties \r\n\r\nWhen an inherited property is used as a REPL keyword, the REPL crashes.\r\n\r\n    ➜  Desktop  iojs\r\n    > process.version\r\n    'v2.3.4'\r\n    > .toString\r\n    readline.js:913\r\n            stream[ESCAPE_DECODER].next(r[i]);\r\n                                    ^\r\n    TypeError: Cannot read property 'call' of undefined\r\n        at REPLServer.parseREPLKeyword (repl.js:746:15)\r\n        at REPLServer.<anonymous> (repl.js:284:16)\r\n        at emitOne (events.js:77:13)\r\n        at REPLServer.emit (events.js:169:7)\r\n        at REPLServer.Interface._onLine (readline.js:210:10)\r\n        at REPLServer.Interface._line (readline.js:549:8)\r\n        at REPLServer.Interface._ttyWrite (readline.js:826:14)\r\n        at ReadStream.onkeypress (readline.js:105:10)\r\n        at emitTwo (events.js:87:13)\r\n        at ReadStream.emit (events.js:172:7)\r\n    ➜  Desktop\r\n\r\nThis patch makes the internal `commands` object inherit from `null` so\r\nthat there will be no inherited properties.\r\n\r\n    > process.version\r\n    'v2.3.5-pre'\r\n    > .toString\r\n    Invalid REPL keyword\r\n    >\r\n\r\n---\r\n\r\n#### 4. Better empty line handling\r\n\r\nIn REPL, if we try to evaluate an empty line, we get `undefined`.\r\n\r\n    > process.version\r\n    'v2.3.4'\r\n    >\r\n    undefined\r\n    >\r\n    undefined\r\n    >\r\n\r\nThis patch prevents `undefined` from printing if the string is empty.\r\n\r\n    > process.version\r\n    'v2.3.5-pre'\r\n    >\r\n    >\r\n    >"},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/124577455","html_url":"https://github.com/nodejs/io.js/pull/2163#issuecomment-124577455","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/2163","id":124577455,"user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T16:51:34Z","updated_at":"2015-07-24T16:51:34Z","body":"@thefourtheye yeah do the thing, that just looks like jenkins hasn't had enough coffee or something."}}