diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 00:58:47 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-10 00:58:47 +0000 |
commit | 97795849e410b30d146d32b576e63c7795521cf2 (patch) | |
tree | d5c472bdc693512fbff8a11c37b8505ca7a4cb1a /lib | |
parent | 07b88b2616ec09621168b39b03ca28570b838084 (diff) | |
download | ruby-97795849e410b30d146d32b576e63c7795521cf2.tar.gz |
Use `unpack1` instead of `unpack` and `first`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base64.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/base64.rb b/lib/base64.rb index 280df5a2bb..24f0b02966 100644 --- a/lib/base64.rb +++ b/lib/base64.rb @@ -56,7 +56,7 @@ module Base64 # This is line three # And so on... def decode64(str) - str.unpack("m").first + str.unpack1("m") end # Returns the Base64-encoded version of +bin+. @@ -71,7 +71,7 @@ module Base64 # ArgumentError is raised if +str+ is incorrectly padded or contains # non-alphabet characters. Note that CR or LF are also rejected. def strict_decode64(str) - str.unpack("m0").first + str.unpack1("m0") end # Returns the Base64-encoded version of +bin+. |