From 4b352f89cf4d785a1165ef9082e8a0e69306dae6 Mon Sep 17 00:00:00 2001 From: Marty Zalega Date: Sun, 24 Jul 2011 11:01:17 +1000 Subject: [PATCH] bug in 1.9.2 interpreter causes crash when using 'zip' on enumerables of bytes, this is a work around until ruby is fixed --- lib/openid/dh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}