rdp / google_hash

wrapper for google's hash functions, for ruby
BSD 3-Clause "New" or "Revised" License
92 stars 16 forks source link

Clone method does not clone the hash but just the structure. #31

Open YvanDaSilva opened 9 years ago

YvanDaSilva commented 9 years ago

Hello, When the method clone is called on the google_hash objects and empty google_hash is returned. See the following code:

a = GoogleHashSparseRubyToRuby.new()
a[:b] = 'test'
a.inspect

=> "GoogleHashSparseRubyToRuby {b=>test}"

c = a.clone

=> GoogleHashSparseRubyToRuby {}

c.inspect

=> "GoogleHashSparseRubyToRuby {}"

For now I am redefining the implementation of clone, manually cloning the object. Best regards, Yvan