diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-04-16 03:34:26 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2014-04-16 03:34:26 +0530 |
commit | e120d21211f9644e9b832e51ba7aa6c45448b782 (patch) | |
tree | 9b51a7550351c694e6743feca57cf4a6c7b69103 /activesupport/lib/active_support | |
parent | 0bccde963c0b3e2ad65b2bdac9d144f40854ec90 (diff) | |
download | rails-e120d21211f9644e9b832e51ba7aa6c45448b782.tar.gz rails-e120d21211f9644e9b832e51ba7aa6c45448b782.tar.bz2 rails-e120d21211f9644e9b832e51ba7aa6c45448b782.zip |
Object#duplicable?
1. Improve tests
2. Remove unnecessary constant
3. Add docs for BigDecimal#duplicable?
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/duplicable.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index 9cd7485e2e..3d2c809c9f 100644 --- a/activesupport/lib/active_support/core_ext/object/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb @@ -78,6 +78,9 @@ end require 'bigdecimal' class BigDecimal + # Needed to support Ruby 1.9.x, as it doesn't allow dup on BigDecimal, instead + # raises TypeError exception. Checking here on the runtime whether BigDecimal + # will allow dup or not. begin BigDecimal.new('4.56').dup |