Blob Blame History Raw
diff --git a/activesupport/test/core_ext/object/duplicable_test.rb b/activesupport/test/core_ext/object/duplicable_test.rb
index 042f5cf..c2d7c15 100644
--- a/activesupport/test/core_ext/object/duplicable_test.rb
+++ b/activesupport/test/core_ext/object/duplicable_test.rb
@@ -4,9 +4,13 @@
 require 'active_support/core_ext/numeric/time'
 
 class DuplicableTest < ActiveSupport::TestCase
-  RAISE_DUP  = [nil, false, true, :symbol, 1, 2.3, method(:puts)]
-  ALLOW_DUP = ['1', Object.new, /foo/, [], {}, Time.now, Class.new, Module.new]
-  ALLOW_DUP << BigDecimal.new('4.56')
+  if RUBY_VERSION >= "2.4.0"
+    RAISE_DUP = [method(:puts)]
+    ALLOW_DUP = ["1", Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56"), nil, false, true, :symbol, 1, 2.3]
+  else
+    RAISE_DUP = [nil, false, true, :symbol, 1, 2.3, method(:puts)]
+    ALLOW_DUP = ["1", Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56")]
+  end
 
   def test_duplicable
     rubinius_skip "* Method#dup is allowed at the moment on Rubinius\n" \