You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.0 KiB
22 lines
1.0 KiB
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" \
|