How does Hash works internally,
Case1:
Code:
# Literal Hash
h0 = { ’one’ => 1, ’two’ => 2, ’three’ => 3}
Code:
# Populating a hash
h1 = Hash.new » {}
h1[’gemstone’] = ’ruby’
h1[’fruit’] = ’banana’
it prints as below
{"three"=>3, "two"=>2, "one"=>1}...