You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in #2261, the REPL's stringify() was fixed to support BigInts, and @erights observed that it would fail similarly for symbols, undefined, NaN, Infinity, and -Infinity "all of which are primitive values that don't encode in JSON."
Description of the Design
Replace the special case branch with a replacer in the JSON.stringify() call that handles all these primitives.
Security Considerations
The REPL won't be able to report values containing these kinds of primitives. This results in an error, so it won't go unnoticed.
Test Plan
Added a failing test for NaN in test-repl.js
The text was updated successfully, but these errors were encountered:
What is the Problem Being Solved?
in #2261, the REPL's
stringify()
was fixed to support BigInts, and @erights observed that it would fail similarly for symbols,undefined
,NaN
,Infinity
, and-Infinity
"all of which are primitive values that don't encode in JSON."Description of the Design
Replace the special case branch with a replacer in the
JSON.stringify()
call that handles all these primitives.Security Considerations
The REPL won't be able to report values containing these kinds of primitives. This results in an error, so it won't go unnoticed.
Test Plan
Added a failing test for NaN in
test-repl.js
The text was updated successfully, but these errors were encountered: