Project

General

Profile

Feature #4239 ยป test.rb

zdavatz (Zeno Davatz), 01/21/2011 12:53 AM

 
1

    
2
h = {'a' => 1, 'b' => 2, 'c' => 3}
3
p h
4
h.each_key do |k|
5
  p k
6
  if k == 'c'
7
    h['d'] = 4
8
  end
9
end
10
p h