Ruby 将哈希数据转成 YAML 2015/03/21 13496 require 'yaml' puts ({ 'measurements' => 'metric' }.to_yaml) puts ({ :measurements => :metric }.to_yaml)