aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2017-03-23 17:34:30 +0530
committerVipul A M <vipulnsward@gmail.com>2017-03-23 17:34:30 +0530
commit7045e03dee2cda9af65bc8e51bddab79599f44cd (patch)
treedc448a96b52288beb2aa14126f97dc0d687639fb /activesupport/test/core_ext/object
parenteb85100426dd49c355bb712759859537c6de9ead (diff)
downloadrails-7045e03dee2cda9af65bc8e51bddab79599f44cd.tar.gz
rails-7045e03dee2cda9af65bc8e51bddab79599f44cd.tar.bz2
rails-7045e03dee2cda9af65bc8e51bddab79599f44cd.zip
Fix duplicable? for Ratiional and Complex on ruby master, since they are now duplicable
Diffstat (limited to 'activesupport/test/core_ext/object')
-rw-r--r--activesupport/test/core_ext/object/duplicable_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/object/duplicable_test.rb b/activesupport/test/core_ext/object/duplicable_test.rb
index e6f3c8aef2..68b0129980 100644
--- a/activesupport/test/core_ext/object/duplicable_test.rb
+++ b/activesupport/test/core_ext/object/duplicable_test.rb
@@ -4,7 +4,10 @@ require "active_support/core_ext/object/duplicable"
require "active_support/core_ext/numeric/time"
class DuplicableTest < ActiveSupport::TestCase
- if RUBY_VERSION >= "2.4.1"
+ if RUBY_VERSION >= "2.5.0"
+ RAISE_DUP = [method(:puts)]
+ ALLOW_DUP = ["1", "symbol_from_string".to_sym, Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56"), nil, false, true, 1, 2.3, Complex(1), Rational(1)]
+ elsif RUBY_VERSION >= "2.4.1"
RAISE_DUP = [method(:puts), Complex(1), Rational(1)]
ALLOW_DUP = ["1", "symbol_from_string".to_sym, Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56"), nil, false, true, 1, 2.3]
elsif RUBY_VERSION >= "2.4.0" # Due to 2.4.0 bug. This elsif cannot be removed unless we drop 2.4.0 support...