class BigDecimal
def to_yaml(opts = {})
This is better than self.to_f.to_s since it doesn't lose precision.
This emits the number without any scientific notation.
def to_yaml(opts = {}) return super if defined?(YAML::ENGINE) && !YAML::ENGINE.syck? YAML.quick_emit(nil, opts) do |out| string = to_s out.scalar(YAML_TAG, YAML_MAPPING[string] || string, :plain) end end