Permalink
Browse files

repl: remove workaround for function redefinition

The issue is fixed upstream in V8. Thus we do not need this workaround
in REPL.

Fixes: #548
PR-URL: #9618
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information...
targos committed Dec 3, 2016
1 parent c2c6ae5 commit 007386ee81ceeffd65c2248869717b0717db3e46
Showing with 0 additions and 6 deletions.
  1. +0 −6 lib/repl.js
@@ -254,12 +254,6 @@ function REPLServer(prompt,
// an expression.
cmd = `(${cmd})`;
self.wrappedCmd = true;
} else {
// Mitigate https://github.com/nodejs/node/issues/548
cmd = cmd.replace(
/^\s*function(?:\s*(\*)\s*|\s+)([^(]+)/,
(_, genStar, name) => `var ${name} = function ${genStar || ''}${name}`
);
}
// Append a \n so that it will be either
// terminated, or continued onto the next expression if it's an

0 comments on commit 007386e

Please sign in to comment.