diff --git a/lib/openid/dh.rb b/lib/openid/dh.rb index cbe53114..0c15b867 100644 --- a/lib/openid/dh.rb +++ b/lib/openid/dh.rb @@ -57,7 +57,7 @@ def DiffieHellman.strxor(s, t) end if String.method_defined? :bytes - s.bytes.zip(t.bytes).map{|sb,tb| sb^tb}.pack('C*') + s.bytes.to_a.zip(t.bytes.to_a).map{|sb,tb| sb^tb}.pack('C*') else indices = 0...(s.length) chrs = indices.collect {|i| (s[i]^t[i]).chr}