Ruby 输出哈希数据到 YAML 文件 2015/08/21 36567 清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>> require 'yaml' h = {} h[:name] = "Robert" h[:nickname] = "Bob" h[:age] = 43 h[:email_addresses] = {:home => "bob@example.com", :work => "robert@example.com"} puts h.to_yaml