Skip to content

Commit

Permalink
[Truffle] Hash#invert specs passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Mar 3, 2015
1 parent d7ca496 commit ab8c9e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions spec/truffle/tags/core/hash/invert_tags.txt

This file was deleted.

8 changes: 8 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/hash.rb
Expand Up @@ -89,4 +89,12 @@ def values
ary
end

def invert
inverted = {}
each_item do |item|
inverted[item.value] = item.key
end
inverted
end

end

0 comments on commit ab8c9e4

Please sign in to comment.