From 83d3b0dbf17582401eb549c4a30f03ecbbfd1a88 Mon Sep 17 00:00:00 2001 From: utilum Date: Wed, 21 Dec 2016 17:41:36 +0100 Subject: Fix Complex and Rational are duplicable? See [this test](https://gist.github.com/utilum/78918f1b64f8b61ee732cb266db7c43a). --- activesupport/test/core_ext/object/duplicable_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/object/duplicable_test.rb b/activesupport/test/core_ext/object/duplicable_test.rb index c2a1e68f57..f78a5f8496 100644 --- a/activesupport/test/core_ext/object/duplicable_test.rb +++ b/activesupport/test/core_ext/object/duplicable_test.rb @@ -5,10 +5,10 @@ require "active_support/core_ext/numeric/time" class DuplicableTest < ActiveSupport::TestCase if RUBY_VERSION >= "2.4.0" - RAISE_DUP = [method(:puts)] + RAISE_DUP = [method(:puts), Complex(1), Rational(1)] 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)] + RAISE_DUP = [nil, false, true, :symbol, 1, 2.3, method(:puts), Complex(1), Rational(1)] ALLOW_DUP = ["1", Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56")] end -- cgit v1.2.3