/usr/lib/ruby/vendor_ruby/active_support/core_ext/big_decimal/yaml_conversions.rb is in ruby-activesupport 2:4.2.10-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require 'active_support/deprecation'
ActiveSupport::Deprecation.warn 'core_ext/big_decimal/yaml_conversions is deprecated and will be removed in the future.'
require 'bigdecimal'
require 'yaml'
require 'active_support/core_ext/big_decimal/conversions'
class BigDecimal
YAML_MAPPING = { 'Infinity' => '.Inf', '-Infinity' => '-.Inf', 'NaN' => '.NaN' }
def encode_with(coder)
string = to_s
coder.represent_scalar(nil, YAML_MAPPING[string] || string)
end
end
|