diff --git a/lib/repl.js b/lib/repl.js index 448308a44c007a..955a07101b4336 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -233,7 +233,7 @@ function REPLServer(prompt, var awaitPromise = false; var input = code; - if (/^\s*\{/.test(code) && /\}\s*$/.test(code)) { + if (/^\s*{/.test(code) && /}\s*$/.test(code)) { // It's confusing for `{ a : 1 }` to be interpreted as a block // statement rather than an object literal. So, we first try // to wrap it in parentheses, so that it will be interpreted as