opal/corelib/runtime.js in opal-1.7.3 vs opal/corelib/runtime.js in opal-1.7.4

- old
+ new

@@ -1861,12 +1861,17 @@ Object.assign(block, blockopts); } } // Optimization for a costly operation of prepending '$' to method names - var jsid_cache = {} + var jsid_cache = new Map(); function $jsid(name) { - return jsid_cache[name] || (jsid_cache[name] = '$' + name); + var jsid = jsid_cache.get(name); + if (!jsid) { + jsid = '$' + name; + jsid_cache.set(name, jsid); + } + return jsid; } Opal.jsid = $jsid; // Calls passed method on a ruby object with arguments and block: //