clone
1.6

clone() -> newHash

Returns a clone of hash.

Examples


var h = new Hash({ a: 'apple'});
var clone = h.clone();

h.unset('a');
h.inspect();
// -> #<Hash:{}>

clone.inspect();
// -> #<Hash:{'a': 'apple'}>