google_hash icon indicating copy to clipboard operation
google_hash copied to clipboard

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

Open YvanDaSilva opened this issue 11 years ago • 0 comments

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

YvanDaSilva avatar Dec 18 '14 12:12 YvanDaSilva