From 1b59849f44b1690f5caf4aee591f84bcf2ae2d79 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Feb 10 2017 15:29:45 +0000 Subject: Suppress deprecated Fixnum warnings on Ruby 2.4.0. --- diff --git a/rubygem-ffi-1.9.17-suppress-Fixnum-warning-ruby2.4.patch b/rubygem-ffi-1.9.17-suppress-Fixnum-warning-ruby2.4.patch new file mode 100644 index 0000000..bc0f35d --- /dev/null +++ b/rubygem-ffi-1.9.17-suppress-Fixnum-warning-ruby2.4.patch @@ -0,0 +1,13 @@ +diff --git a/lib/ffi/struct_layout_builder.rb b/lib/ffi/struct_layout_builder.rb +index 918c790..ce80f67 100644 +--- a/lib/ffi/struct_layout_builder.rb ++++ b/lib/ffi/struct_layout_builder.rb +@@ -87,7 +87,7 @@ def union? + # @return [0,1] + # + def packed=(packed) +- if packed.is_a?(Fixnum) ++ if packed.is_a?(Integer) + @alignment = packed + @packed = packed + else diff --git a/rubygem-ffi.spec b/rubygem-ffi.spec index 732ed94..0c6f92f 100644 --- a/rubygem-ffi.spec +++ b/rubygem-ffi.spec @@ -2,13 +2,16 @@ Name: rubygem-%{gem_name} Version: 1.9.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: FFI Extensions for Ruby Group: Development/Languages License: BSD URL: http://wiki.github.com/ffi/ffi Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# Suppress deprecated Fixnum warnings on Ruby 2.4.0. +# https://github.com/ffi/ffi/pull/557 +Patch0: rubygem-ffi-1.9.17-suppress-Fixnum-warning-ruby2.4.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel @@ -39,6 +42,8 @@ gem unpack %{SOURCE0} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +%patch0 -p1 + %build # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec @@ -92,6 +97,9 @@ popd %{gem_instdir}/Rakefile %changelog +* Fri Feb 10 2017 Jun Aruga - 1.9.14-3 +- Suppress deprecated Fixnum warnings on Ruby 2.4.0. + * Tue Jan 10 2017 Vít Ondruch - 1.9.14-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4