Pointing out that I'm replying to a message with an empty subject - using
the correct original title here

---------- Forwarded message ----------
From: Rock <[email protected]>
Benjamin Gruenaum, Andrea Giammarchi, you are wrong about RegExp:
```js
var re = /./;
new RegExp(re) === re; // false
RegExp(re) === re; // true

Nice catch. This is states explicitly as a difference to the rule here
http://es5.github.io/#x15.10.3.1

> If pattern is an object R whose [[Class]] internal property is "RegExp"
and flags is undefined, then return R unchanged. Otherwise call the
standard built-in RegExp constructor (15.10.4.1) as if by the expression
new RegExp( pattern, flags) and return the object constructed by that
constructor.

I didn't notice that - thanks.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to