paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 389 forks source link

Object.keys throws on regexes in ES3 browsers #287

Closed ljharb closed 8 years ago

ljharb commented 10 years ago

It seems Object(/a/g), in ES3 browsers (Safari 4 for example), doesn't return an object that our shimmed Object.keys can handle, and it throws.