https://github.com/Kitware/CMake
Revision 802d0aa0b0a0af72fdc95bf1f69afeb362b6ef95 authored by Evangelos Foutras on 29 December 2014, 17:02:04 UTC, committed by Brad King on 11 January 2015, 19:49:51 UTC
Since commit v2.8.8~173^2 (FindRuby: clean up querying variables from
Ruby, 2012-02-17) we query RbConfig::CONFIG first and, if the command
fails or its output equates to a false constant, then fall back to
querying Config::CONFIG.

Due to the above, an error condition exists with Ruby 2.2.0; when
querying RbConfig::CONFIG['TEENY'], the output of '0' will be discarded
since it matches the false constant '0'.

In previous versions this wasn't a problem, but Ruby 2.2 has completely
removed Config::CONFIG. This causes RUBY_VERSION_PATCH to be set to an
empty string and the Ruby version to be detected as '2.2.' (instead of
'2.2.0').

Fix the output check to explicitly look for an empty string before using
the fallback query method. (Someone more familiar with Ruby might be
able to deem the fallback as unnecessary and fully remove it.)
1 parent c118816
History
Tip revision: 802d0aa0b0a0af72fdc95bf1f69afeb362b6ef95 authored by Evangelos Foutras on 29 December 2014, 17:02:04 UTC
FindRuby: Fix output check in _RUBY_CONFIG_VAR
Tip revision: 802d0aa
File Mode Size
Auxiliary
Help
Licenses
Modules
Source
Templates
Tests
Utilities
.gitattributes -rw-r--r-- 613 bytes
.hooks-config.bash -rw-r--r-- 866 bytes
CMakeCPack.cmake -rw-r--r-- 6.5 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 3.5 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 23.4 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 1009 bytes
CTestConfig.cmake -rw-r--r-- 870 bytes
CTestCustom.cmake.in -rw-r--r-- 3.8 KB
CompileFlags.cmake -rw-r--r-- 3.1 KB
Copyright.txt -rw-r--r-- 2.6 KB
DartConfig.cmake -rw-r--r-- 804 bytes
README.rst -rw-r--r-- 2.9 KB
bootstrap -rwxr-xr-x 56.7 KB
cmake_uninstall.cmake.in -rw-r--r-- 790 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top