Skip to content

Commit fe2f058

Browse files
targositaloacasas
authored andcommitted
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 <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent 8612a00 commit fe2f058

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/repl.js

-6
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)