lib/picky/backends/google_hash.rb in picky-4.27.0 vs lib/picky/backends/google_hash.rb in picky-4.27.1
- old
+ new
@@ -1,8 +1,10 @@
if require 'google_hash'
class ::GoogleHashSparseRubyToRuby
+
+ alias each_pair each
# This is mainly used in tests, which is
# why we allow for a silly implementation.
#
def == hash
@@ -22,19 +24,21 @@
#
def to_hash
true
end
+ # TODO
#
- #
def inject init, &block
result = init
each do |key, value|
result = block.call result, [key, value]
end
result
end
+ # TODO
+ #
def size
result = 0
# each only accepts a block
each { result += 1 }
result
\ No newline at end of file