Fix Fixnum/Bignum deprecated warning for Ruby 2.4.0.

f38
Jun Aruga 8 years ago
parent bcf49f4cdd
commit 0cd78450e1

@ -0,0 +1,22 @@
From 598f10c00084f20e277b82ed83a8ef8bd85a1a78 Mon Sep 17 00:00:00 2001
From: utilum <oz@utilum.com>
Date: Thu, 15 Dec 2016 02:42:52 +0100
Subject: [PATCH] Fix Fixnum deprecated warning in Ruby 2.4+
---
activesupport/test/core_ext/duration_test.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb
index 26a9ea4..6f7f16d 100644
--- a/activesupport/test/core_ext/duration_test.rb
+++ b/activesupport/test/core_ext/duration_test.rb
@@ -21,7 +21,7 @@ class << k; undef_method :== end
end
def test_instance_of
- assert 1.minute.instance_of?(Fixnum)
+ assert 1.minute.instance_of?(1.class)
assert 2.days.instance_of?(ActiveSupport::Duration)
assert !3.second.instance_of?(Numeric)
end

@ -0,0 +1,22 @@
From 8683ac5983ddfd8b47b6aac6ab51269611610f42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20Fran=C3=A7a?= <rafaelmfranca@gmail.com>
Date: Sun, 13 Nov 2016 19:58:52 -0500
Subject: [PATCH] Merge pull request #27033 from vipulnsward/fix-bignum-warning
Remove warning from Bignum constant access
---
activesupport/test/core_ext/numeric_ext_test.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb
index 69c30a8..79a4802 100644
--- a/activesupport/test/core_ext/numeric_ext_test.rb
+++ b/activesupport/test/core_ext/numeric_ext_test.rb
@@ -425,7 +425,6 @@ def test_in_milliseconds
# TODO: Remove positive and negative tests when we drop support to ruby < 2.3
b = 2**64
- b *= b until Bignum === b
T_ZERO = b.coerce(0).first
T_ONE = b.coerce(1).first

@ -3,7 +3,7 @@
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Epoch: 1 Epoch: 1
Version: 5.0.1 Version: 5.0.1
Release: 3%{?dist} Release: 4%{?dist}
Summary: A support libraries and Ruby core extensions extracted from the Rails framework Summary: A support libraries and Ruby core extensions extracted from the Rails framework
Group: Development/Languages Group: Development/Languages
License: MIT License: MIT
@ -45,6 +45,14 @@ Patch9: rubygem-activesupport-5.0.1-duplicable-symbol-tests.patch
# https://github.com/rails/rails/commit/c784102 # https://github.com/rails/rails/commit/c784102
Patch10: rubygem-activesupport-5.0.1-iso8601_output.patch Patch10: rubygem-activesupport-5.0.1-iso8601_output.patch
# Fix Fixnum deprecated warning in Ruby 2.4+
# https://github.com/rails/rails/commit/598f10c
Patch11: rubygem-activesupport-5.0.1-Fix-Fixnum-duration-test.patch
# Remove Bignum deprecated warning in Ruby 2.4+
# https://github.com/rails/rails/commit/8683ac5
Patch12: rubygem-activesupport-5.0.1-remove-warning-from-Bignum.patch
# ruby package has just soft dependency on rubygem(bigdecimal), while # ruby package has just soft dependency on rubygem(bigdecimal), while
# ActiveSupport always requires it. # ActiveSupport always requires it.
Requires: rubygem(bigdecimal) Requires: rubygem(bigdecimal)
@ -107,6 +115,8 @@ patch -p2 < %{PATCH4}
cat %{PATCH7} | patch -p2 cat %{PATCH7} | patch -p2
cat %{PATCH9} | patch -p2 cat %{PATCH9} | patch -p2
cat %{PATCH10} | patch -p2 cat %{PATCH10} | patch -p2
cat %{PATCH11} | patch -p2
cat %{PATCH12} | patch -p2
# These tests are really unstable, but they seems to be passing upstream :/ # These tests are really unstable, but they seems to be passing upstream :/
for f in test/evented_file_update_checker_test.rb test/file_update_checker_test.rb; do for f in test/evented_file_update_checker_test.rb test/file_update_checker_test.rb; do
@ -135,6 +145,9 @@ popd
%doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/README.rdoc
%changelog %changelog
* Mon Feb 13 2017 Jun Aruga <jaruga@redhat.com> - 1:5.0.1-4
- Fix Fixnum/Bignum deprecated warning for Ruby 2.4.0.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:5.0.1-3 * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:5.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

Loading…
Cancel
Save