1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use unpack1 instead of unpack and [0]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-07-20 23:34:03 +00:00
parent 93fe0ff2f1
commit 0055f09bcc

View file

@ -1035,9 +1035,9 @@ module Net
end end
# Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5 # Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5
# on Wikipedia: http://en.wikipedia.org/wiki/CRAM-MD5 # on Wikipedia: https://en.wikipedia.org/wiki/CRAM-MD5
def cram_md5_challenge def cram_md5_challenge
@string.split(/ /)[1].unpack('m')[0] @string.split(/ /)[1].unpack1('m')
end end
# Returns a hash of the human readable reply text in the response if it # Returns a hash of the human readable reply text in the response if it