From 97795849e410b30d146d32b576e63c7795521cf2 Mon Sep 17 00:00:00 2001 From: kazu Date: Fri, 10 Feb 2017 00:58:47 +0000 Subject: Use `unpack1` instead of `unpack` and `first` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/base64.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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+. -- cgit v1.2.3