[前][次][番号順一覧][スレッド一覧]

ruby-changes:27157

From: naruse <ko1@a...>
Date: Tue, 12 Feb 2013 12:18:14 +0900 (JST)
Subject: [ruby-changes:27157] naruse:r39209 (trunk): Get libc's path by ldd [Bug #7828]

naruse	2013-02-12 12:18:04 +0900 (Tue, 12 Feb 2013)

  New Revision: 39209

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39209

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

  Modified files:
    trunk/test/ruby/test_m17n_comb.rb

Index: test/ruby/test_m17n_comb.rb
===================================================================
--- test/ruby/test_m17n_comb.rb	(revision 39208)
+++ test/ruby/test_m17n_comb.rb	(revision 39209)
@@ -722,7 +722,8 @@ class TestM17NComb < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_m17n_comb.rb#L722
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]