diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-26 06:30:46 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-26 06:37:50 +0900 |
commit | 442daca3c42ad383e84b33b43149c5fa7137b154 (patch) | |
tree | 67e6b18f34640015c7b6af026e094d3f7b586706 /activesupport/test/core_ext/object | |
parent | e560d911dc18f3f4edd25622efcb22ed74a4cebe (diff) | |
download | rails-442daca3c42ad383e84b33b43149c5fa7137b154.tar.gz rails-442daca3c42ad383e84b33b43149c5fa7137b154.tar.bz2 rails-442daca3c42ad383e84b33b43149c5fa7137b154.zip |
Uninterned Symbol can be duped since ruby 2.4.1
https://github.com/ruby/ruby/commit/11e6bd5ac2a2eebfa589bd6db8c9c4daa337733e
Leaving the 2.4.0 conditional for now, in order never to forget backporting r57407 to 2.4.1
Diffstat (limited to 'activesupport/test/core_ext/object')
-rw-r--r-- | activesupport/test/core_ext/object/duplicable_test.rb | 5 |
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 1755d80b5f..e6f3c8aef2 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.0" + if 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... RAISE_DUP = [method(:puts), Complex(1), Rational(1), "symbol_from_string".to_sym] ALLOW_DUP = ["1", Object.new, /foo/, [], {}, Time.now, Class.new, Module.new, BigDecimal.new("4.56"), nil, false, true, 1, 2.3] else |