Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only backport the to_d method if it does not exist

  • Loading branch information...
commit bac5da3ccc43785d83628bc1147b3300f1cb5f95 1 parent 4af4312
Aaron Patterson tenderlove authored
7 activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
View
@@ -29,8 +29,11 @@ def encode_with(coder)
coder.represent_scalar(nil, YAML_MAPPING[string] || string)
end
- def to_d
- self
+ # Backport this method if it doesn't exist
+ unless method_defined?(:to_d)
+ def to_d
+ self
+ end
end
DEFAULT_STRING_FORMAT = 'F'
Please sign in to comment.
Something went wrong with that request. Please try again.