Replace hash with a constant
counties = { "Three" => 3, "Five" => 5 } counties.replace( { "Three" => 3 } )