Skip to content

Commit

Permalink
Fix Hash#[] to not return inherited properties on hash object
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 28, 2013
1 parent 8f800db commit 176059d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions corelib/hash.rb
Expand Up @@ -111,10 +111,10 @@ def ==(other)

def [](key)
%x{
var bucket = #{self}.map[key];
var map = #{self}.map;
if (bucket != null) {
return bucket;
if ($hasOwn.call(map, key)) {
return map[key];
}
var proc = #{@proc};
Expand Down

0 comments on commit 176059d

Please sign in to comment.