summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n_comb.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 13:09:15 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-20 13:09:15 +0000
commitbf445c240a189ef973d22052d2099efc0f1c0602 (patch)
tree375d66002b60b56cc513e17677a507f333586952 /test/ruby/test_m17n_comb.rb
parentcea7600b524cfc5023a15436f1263a5c872f99d9 (diff)
fix guards for glibc crypt(3) see #7312
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n_comb.rb')
-rw-r--r--test/ruby/test_m17n_comb.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index b275d78356..903e0de134 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -722,14 +722,14 @@ 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 = `/lib/libc.so.6`[/\AGNU C Library.*version ([0-9.]+)/, 1].split('.')
+ glibcver = `/lib/libc.so.6`[/\AGNU C Library.*version ([0-9.]+)/, 1].split('.').map(&:to_i)
strict_crypt = (glibcver <=> [2, 16]) > -1
rescue
end
combination(STRINGS, STRINGS) {|str, salt|
if strict_crypt
- next unless /\A[0-9a-zA-Z.\/]+\z/ =~ salt
+ next unless salt.ascii_only? && /\A[0-9a-zA-Z.\/]+\z/ =~ salt
end
if a(salt).length < 2
assert_raise(ArgumentError) { str.crypt(salt) }