Skip to content

Commit

Permalink
repl: remove workaround for function redefinition
Browse files Browse the repository at this point in the history
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 Feb 14, 2017
1 parent 8612a00 commit fe2f058
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe2f058

Please sign in to comment.