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

PR-URL: nodejs#11029
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
targos committed Feb 7, 2017
1 parent b8c078a commit ce020fb
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 ce020fb

Please sign in to comment.