Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a76135a3c71a
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cda417c46ed9
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Oct 9, 2013

  1. Copy the full SHA
    ba0809d View commit details
  2. Copy the full SHA
    cda417c View commit details
Showing with 7 additions and 2 deletions.
  1. +7 −2 corelib/hash.rb
9 changes: 7 additions & 2 deletions corelib/hash.rb
Original file line number Diff line number Diff line change
@@ -181,8 +181,11 @@ def clear

def clone
%x{
var result = $hash(),
map = #{self}.map,
var result = new self._klass._alloc();
result.map = {}; result.keys = [];
var map = #{self}.map,
map2 = result.map,
keys2 = result.keys;
@@ -702,6 +705,8 @@ def shift

alias size length

alias_method :store, :[]=

def to_a
%x{
var keys = #{self}.keys, map = #{self}.map, result = [];