Issue #10717 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONE to 2.0.0: UNKNOWN, 2.1: DONE, 2.2: DONE

At r50668, r49703 is partially merged into `ruby_2_1`.

----------------------------------------
Bug #10717: TestGemExtCmakeBuilder#test_self_build fails on RHEL 6/CentOS 6
https://bugs.ruby-lang.org/issues/10717#change-52684

* Author: Vit Ondruch
* Status: Closed
* Priority: Normal
* Assignee: Eric Hodel
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu]
* Backport: 2.0.0: UNKNOWN, 2.1: DONE, 2.2: DONE
----------------------------------------
~~~
$ rpm -q cmake
cmake-2.6.4-5.el6.x86_64

$ make test-all TESTS=-n\ TestGemExtCmakeBuilder#test_self_build

<snip>

./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"  -n TestGemExtCmakeBuilder#test_self_build
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -n TestGemExtCmakeBuilder#test_self_build

# Running tests:

[1/0] TestGemExtCmakeBuilder#test_self_build = 0.29 s
  1) Error:
TestGemExtCmakeBuilder#test_self_build:
Gem::InstallError: cmake failed, exit code 1
    /builddir/build/BUILD/ruby-2.2.0/lib/rubygems/ext/builder.rb:89:in `run'
    /builddir/build/BUILD/ruby-2.2.0/lib/rubygems/ext/cmake_builder.rb:9:in `build'
    /builddir/build/BUILD/ruby-2.2.0/test/rubygems/test_gem_ext_cmake_builder.rb:33:in `block in test_self_build'
    /builddir/build/BUILD/ruby-2.2.0/test/rubygems/test_gem_ext_cmake_builder.rb:32:in `chdir'
    /builddir/build/BUILD/ruby-2.2.0/test/rubygems/test_gem_ext_cmake_builder.rb:32:in `test_self_build'

Closed file descriptor: TestGemExtCmakeBuilder#test_self_build: 7
Finished tests in 7.221309s, 0.1385 tests/s, 0.0000 assertions/s.
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux-gnu]
make: *** [yes-test-all] Error 1
~~~

This PR fixes the issue in RubyGems: https://github.com/rubygems/rubygems/pull/1124



-- 
https://bugs.ruby-lang.org/