Skip to content

Commit

Permalink
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
Original file line number Diff line number Diff line change
@@ -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.