From 007386ee81ceeffd65c2248869717b0717db3e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 3 Dec 2016 14:57:12 +0100 Subject: [PATCH] repl: remove workaround for function redefinition The issue is fixed upstream in V8. Thus we do not need this workaround in REPL. Fixes: https://github.com/nodejs/node/issues/548 PR-URL: https://github.com/nodejs/node/pull/9618 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Ben Noordhuis --- lib/repl.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 302e79f9a2752c..29f25a5c37b8c1 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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