aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-04-15 19:10:24 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-04-15 19:10:24 -0300
commite665ce714133bfc0b45a20359c7d5af86bfb54d9 (patch)
treec9ec276d454f29af3af2328aadadeabd7918daeb /activesupport/lib
parenta21fae70fc77ea5e6758c0b084513e98d3a9d639 (diff)
parente120d21211f9644e9b832e51ba7aa6c45448b782 (diff)
downloadrails-e665ce714133bfc0b45a20359c7d5af86bfb54d9.tar.gz
rails-e665ce714133bfc0b45a20359c7d5af86bfb54d9.tar.bz2
rails-e665ce714133bfc0b45a20359c7d5af86bfb54d9.zip
Merge pull request #14733 from akshay-vishnoi/test-cases
Improve tests for duplicable, remove unnecessary constant
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/object/duplicable.rb3
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