Skip to content

Loading…

bug in ruby 1.9.2 causes crash #22

Merged
merged 1 commit into from

8 participants

@evilmarty

bug in 1.9.2 interpreter causes crash when using 'zip' on enumerables of bytes, this is a work around until ruby is fixed.

Marty Zalega bug in 1.9.2 interpreter causes crash when using 'zip' on enumerables…
… of bytes, this is a work around until ruby is fixed
4b352f8
@zeropx

this is the line that has been killing me. glad it was fixed. Thanks.

@cleishm

Hi,

Is the root cause issue logged against 1.9.2? Do you have a link/reference?

Cheers,
chris

Thank you Thank you Thank you - This was causing me significant grief. It works now!! How did you ever figure this out?

Thanks!

@jmthomas

I had the same problem. Came across this discussion from here: http://stackoverflow.com/questions/6845233/ruby-1-9-2-p180-crashing-under-os-x-lion. I'm not sure how the person in the stackoverflow discussion got his to work because I uninstalled the gem and reinstalled with no luck.

@evilmarty

for posterity, here is the bug http://www.ruby-forum.com/topic/2146759

@jwang jwang added a commit to jwang/ruby-openid that referenced this pull request
@jwang jwang Update to deal with seg fault from Ruby 1.9.2-p290 and below running …
…on OSX Lion.


See the upstream branch's pull request #22 for more details.
openid#22
5363931
@dpiddy

Just got hit by this and this PR fixes it locally. Anything else need to be done to get this committed and released?

@dennisreimann dennisreimann merged commit 3a677a8 into openid:master
@dennisreimann
OpenID member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 24, 2011
  1. bug in 1.9.2 interpreter causes crash when using 'zip' on enumerables…

    Marty Zalega committed
    … of bytes, this is a work around until ruby is fixed
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/openid/dh.rb
View
2 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}
Something went wrong with that request. Please try again.