Skip to content

Commit 007386e

Browse files
committed
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent c2c6ae5 commit 007386e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

‎lib/repl.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,6 @@ function REPLServer(prompt,
254254
// an expression.
255255
cmd=`(${cmd})`;
256256
self.wrappedCmd=true;
257-
}else{
258-
// Mitigate https://github.com/nodejs/node/issues/548
259-
cmd=cmd.replace(
260-
/^\s*function(?:\s*(\*)\s*|\s+)([^(]+)/,
261-
(_,genStar,name)=>`var ${name} = function ${genStar||''}${name}`
262-
);
263257
}
264258
// Append a \n so that it will be either
265259
// terminated, or continued onto the next expression if it's an

0 commit comments

Comments
(0)