Ruby/Hash/store

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Store new value a hash

myHash = { 1 => "One", 2 => "Two", 3 => "Three", 4 => "Four", 5 => "Five" }
 
myHash.store(6, "Six")