Convert hash to a hash and check the object id : Converrt to Hash « Hash « Ruby






Convert hash to a hash and check the object id


myHash = { 1920 => "value for 1920", 1925 => "value for 1925", 1934 => "value for 1934" }

fitz = myHash.to_hash # => {1925=>"value for 1925", 1920=>"value for 1920", 1934=>"value for 1934"}
fitz.object_id # => 1745050
myHash.object_id # => 1745050

 








Related examples in the same category