From 1cff8c824abd8faeb9cd7866ccffc7a095281193 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 12 May 2017 08:10:36 +0000 Subject: [PATCH] remove code old versions * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): remove code old versions. `RbConfig::CONFIG["rubyhdrdir"]` is since 1.9, and `RbConfig::CONFIG["rubyarchhdrdir"]` is since 2.0.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/rubyspec/optional/capi/spec_helper.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec/rubyspec/optional/capi/spec_helper.rb b/spec/rubyspec/optional/capi/spec_helper.rb index e60016f4a7..ca0685c9fe 100644 --- a/spec/rubyspec/optional/capi/spec_helper.rb +++ b/spec/rubyspec/optional/capi/spec_helper.rb @@ -29,12 +29,8 @@ def compile_extension(name) if RUBY_NAME == 'rbx' hdrdir = RbConfig::CONFIG["rubyhdrdir"] elsif RUBY_NAME =~ /^ruby/ - if hdrdir = RbConfig::CONFIG["rubyhdrdir"] - arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"] || - File.join(hdrdir, RbConfig::CONFIG["arch"]) - else - hdrdir = RbConfig::CONFIG["archdir"] - end + hdrdir = RbConfig::CONFIG["rubyhdrdir"] + arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"] elsif RUBY_NAME == 'jruby' require 'mkmf' hdrdir = $hdrdir