From fe2f058f174a619173f7ca740ff54f5959119823 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 Refs: https://github.com/nodejs/node/pull/9618 PR-URL: https://github.com/nodejs/node/pull/11029 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Myles Borins --- 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