merge revision(s) 39209:

Get libc's path by ldd [Bug #7828] [ruby-core:52129]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-02-13 06:35:19 +00:00
parent b7b9aa6609
commit 4f05e726f6

View file

@ -722,7 +722,8 @@ class TestM17NComb < Test::Unit::TestCase
def test_str_crypt
begin
# glibc 2.16 or later denies salt contained other than [0-9A-Za-z./] #7312
glibcver = `#{RbConfig::CONFIG["libdir"]}/libc.so.6`[/\AGNU C Library.*version ([0-9.]+)/, 1].split('.').map(&:to_i)
glibcpath = `ldd #{RbConfig.ruby}`[/\S+\/libc.so\S+/]
glibcver = `#{glibcpath}`[/\AGNU C Library.*version ([0-9.]+)/, 1].split('.').map(&:to_i)
strict_crypt = (glibcver <=> [2, 16]) > -1
rescue
end