File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 6666
6767 begin
6868 require 'etc'
69- if Etc . confstr ( Etc ::CS_GNU_LIBC_VERSION ) =~ %r{(\d +)\. (\d +)} and $1. to_i > 2 or ( $1. to_i == 2 and $2. to_i >= 28 )
69+ if Etc . confstr ( Etc ::CS_GNU_LIBC_VERSION ) =~ %r{(\d +)\. (\d +)} &&
70+ ( Regexp . last_match ( 1 ) . to_i > 2 || ( Regexp . last_match ( 1 ) . to_i == 2 && Regexp . last_match ( 2 ) . to_i >= 28 ) )
7071 context 'when running on platform with bcrypt' do
7172 it { is_expected . to run . with_params ( 'password' , 'bcrypt' , '05$salt.salt.salt.salt.sa' ) . and_return ( '$2b$05$salt.salt.salt.salt.sO5QUgeeLRANZyvfNiKJW5amLo3cVD8nW' ) }
7273 it { is_expected . to run . with_params ( 'password' , 'bcrypt-a' , '05$salt.salt.salt.salt.sa' ) . and_return ( '$2a$05$salt.salt.salt.salt.sO5QUgeeLRANZyvfNiKJW5amLo3cVD8nW' ) }
7374 it { is_expected . to run . with_params ( 'password' , 'bcrypt-x' , '05$salt.salt.salt.salt.sa' ) . and_return ( '$2x$05$salt.salt.salt.salt.sO5QUgeeLRANZyvfNiKJW5amLo3cVD8nW' ) }
7475 it { is_expected . to run . with_params ( 'password' , 'bcrypt-y' , '05$salt.salt.salt.salt.sa' ) . and_return ( '$2y$05$salt.salt.salt.salt.sO5QUgeeLRANZyvfNiKJW5amLo3cVD8nW' ) }
7576 end
7677 else
77- pending ( " Only testing bcrypt results on glibc 2.28 and later" )
78+ pending ( ' Only testing bcrypt results on glibc 2.28 and later' )
7879 end
7980 rescue NameError
80- pending ( " Only testing bcrypt results on glibc" )
81+ pending ( ' Only testing bcrypt results on glibc' )
8182 end
8283
8384 if RUBY_PLATFORM == 'java' || 'test' . crypt ( '$1$1' ) == '$1$1$Bp8CU9Oujr9SSEw53WV6G.'
You can’t perform that action at this time.
0 commit comments