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
Refs: #9618

PR-URL: #11029
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information...
targos authored and italoacasas committed Dec 3, 2016
1 parent 8612a00 commit fe2f058f174a619173f7ca740ff54f5959119823
Showing with 0 additions and 6 deletions.
  1. +0 −6 lib/repl.js
View
@@ -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 fe2f058

Please sign in to comment.