From de9682b3a228e4cb2a05b91c49a76d76124aee45 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 25 Jan 2016 16:36:21 +0900 Subject: Drop Ruby 1.8.7 support --- ffi.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffi.gemspec b/ffi.gemspec index dc191cf..25591c4 100644 --- a/ffi.gemspec +++ b/ffi.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.rdoc_options = %w[--exclude=ext/ffi_c/.*\.o$ --exclude=ffi_c\.(bundle|so)$] s.license = 'BSD' s.require_paths << 'ext/ffi_c' - s.required_ruby_version = '>= 1.8.7' + s.required_ruby_version = '>= 1.9' s.add_development_dependency 'rake', '~> 10.1' s.add_development_dependency 'rake-compiler', '~> 0.9' s.add_development_dependency 'rake-compiler-dock', '~> 0.5.2' -- cgit v1.2.1 From 850103abec9a4d5932f1b46d04612877eaf4ce95 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Tue, 2 Feb 2016 17:20:04 +0900 Subject: Remove code that handles 1.8.x specifically --- .travis.yml | 2 -- Rakefile | 2 +- lib/ffi/struct.rb | 2 -- spec/ffi/struct_spec.rb | 4 ---- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e10cbc5..1082e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ os: - osx rvm: - "1.9.3" - - "1.8.7" - "2.0.0" - "2.1" - "2.2.3" @@ -32,7 +31,6 @@ matrix: rvm: ruby-head - rvm: "rbx" - rvm: "rbx-head" - - rvm: "1.8.7" - rvm: "1.9.3" after_failure: - "find build -name mkmf.log | xargs cat" diff --git a/Rakefile b/Rakefile index c8e4cf3..89e9b6c 100644 --- a/Rakefile +++ b/Rakefile @@ -175,7 +175,7 @@ if USE_RAKE_COMPILER ext.cross_platform = %w[i386-mingw32 x64-mingw32] # forces the Windows platform instead of the default one end - ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0:2.1.6:2.2.2:2.3.0' + ENV['RUBY_CC_VERSION'] ||= '1.9.3:2.0.0:2.1.6:2.2.2:2.3.0' # To reduce the gem file size strip mingw32 dlls before packaging ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version| diff --git a/lib/ffi/struct.rb b/lib/ffi/struct.rb index 0896d35..bd11a01 100644 --- a/lib/ffi/struct.rb +++ b/lib/ffi/struct.rb @@ -338,10 +338,8 @@ module FFI # @param [StructLayoutBuilder] builder # @param [Hash] spec # @return [builder] - # @raise if Ruby 1.8 # Add hash +spec+ to +builder+. def hash_layout(builder, spec) - raise "Ruby version not supported" if RUBY_VERSION =~ /^1\.8\..*/ spec[0].each do |name, type| builder.add name, find_field_type(type), nil end diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb index 9110d92..6c03277 100644 --- a/spec/ffi/struct_spec.rb +++ b/spec/ffi/struct_spec.rb @@ -7,7 +7,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper")) describe "Struct aligns fields correctly" do it "char, followed by an int" do - pending("not supported in 1.8") if RUBY_VERSION =~ /^1\.8\..*/ class CIStruct < FFI::Struct layout :c => :char, :i => :int end @@ -15,7 +14,6 @@ describe "Struct aligns fields correctly" do end it "short, followed by an int" do - pending("not supported in 1.8") if RUBY_VERSION =~ /^1\.8\..*/ class SIStruct < FFI::Struct layout :s => :short, :i => :int end @@ -23,7 +21,6 @@ describe "Struct aligns fields correctly" do end it "int, followed by an int" do - pending("not supported in 1.8") if RUBY_VERSION =~ /^1\.8\..*/ class IIStruct < FFI::Struct layout :i1 => :int, :i => :int end @@ -31,7 +28,6 @@ describe "Struct aligns fields correctly" do end it "long long, followed by an int" do - pending("not supported in 1.8") if RUBY_VERSION =~ /^1\.8\..*/ class LLIStruct < FFI::Struct layout :l => :long_long, :i => :int end -- cgit v1.2.1