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
PR-URL: #9618
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
  • Loading branch information
targos committed Jan 26, 2017
1 parent c2c6ae5 commit 007386e
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 007386e

Please sign in to comment.