Suppress deprecated Fixnum warnings on Ruby 2.4.0.

epel9
Jun Aruga 8 years ago committed by Dominic Cleal
parent 28aacfbafd
commit 1b59849f44
No known key found for this signature in database
GPG Key ID: 7C7D326F2C2B72CC

@ -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

@ -2,13 +2,16 @@
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 1.9.14 Version: 1.9.14
Release: 2%{?dist} Release: 3%{?dist}
Summary: FFI Extensions for Ruby Summary: FFI Extensions for Ruby
Group: Development/Languages Group: Development/Languages
License: BSD License: BSD
URL: http://wiki.github.com/ffi/ffi URL: http://wiki.github.com/ffi/ffi
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem 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: ruby(release)
BuildRequires: rubygems-devel BuildRequires: rubygems-devel
@ -39,6 +42,8 @@ gem unpack %{SOURCE0}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%patch0 -p1
%build %build
# Create the gem as gem install only works on a gem file # Create the gem as gem install only works on a gem file
gem build %{gem_name}.gemspec gem build %{gem_name}.gemspec
@ -92,6 +97,9 @@ popd
%{gem_instdir}/Rakefile %{gem_instdir}/Rakefile
%changelog %changelog
* Fri Feb 10 2017 Jun Aruga <jaruga@redhat.com> - 1.9.14-3
- Suppress deprecated Fixnum warnings on Ruby 2.4.0.
* Tue Jan 10 2017 Vít Ondruch <vondruch@redhat.com> - 1.9.14-2 * Tue Jan 10 2017 Vít Ondruch <vondruch@redhat.com> - 1.9.14-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 - Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4

Loading…
Cancel
Save