From 29b08c3f5c8e450430bf8e5fcfea28a4e0d683e2 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 25 Mar 2024 17:58:24 -0700 Subject: [PATCH] [spec] avoid coercion See https://github.com/tc39/proposal-regex-escaping/issues/58#issuecomment-2019036982 --- spec.emu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec.emu b/spec.emu index c56fe7a..ef79948 100644 --- a/spec.emu +++ b/spec.emu @@ -25,8 +25,8 @@ contributors: Jordan Harband

It performs the following steps when called:

- 1. Let _str_ be ? ToString(_S_). - 1. Let _cpList_ be StringToCodePoints(_str_). + 1. If _S_ is not a String, throw a TypeError exception. + 1. Let _cpList_ be StringToCodePoints(_S_). 1. Let _escapedList_ be a new empty List. 1. For each code point _c_ in _cpList_, do 1. If _escapedList_ is empty and _c_ is matched by |DecimalDigit|, then