From 8cbb32a8331faa0168a9a5f989e611d838ba2ced Mon Sep 17 00:00:00 2001 From: Adrian Setyadi Date: Tue, 22 Oct 2019 13:29:30 +0700 Subject: Simplify joining 2 strings --- lib/rack/auth/digest/nonce.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rack/auth/digest/nonce.rb b/lib/rack/auth/digest/nonce.rb index 6c1f28a3..089bb6f4 100644 --- a/lib/rack/auth/digest/nonce.rb +++ b/lib/rack/auth/digest/nonce.rb @@ -28,11 +28,11 @@ module Rack end def to_s - [([ @timestamp, digest ] * ' ')].pack("m*").strip + ["#{@timestamp} #{digest}"].pack("m*").strip end def digest - ::Digest::MD5.hexdigest([ @timestamp, self.class.private_key ] * ':') + ::Digest::MD5.hexdigest("#{@timestamp}:#{self.class.private_key}") end def valid? -- cgit v1.2.3-24-ge0c7