From: Robert Klemme Date: 2012-02-13T18:23:56+09:00 Subject: Re: How do I save a Net::BER::BerIdentifiedString as a binary file? On Fri, Feb 10, 2012 at 11:18 PM, Edward Stembler wrote: > Anyone know how to save a Net::BER::BerIdentifiedString as a binary > file? > > I've tried .dump, but that did not work.  I noticed there's a .bytes > enumerator, but I'm not sure what to do with it. > > Basically, I have an Net::BER::BerIdentifiedString [Binary Data] which > is holding a profile photo from an LDAP call, and I want to save it as a > jpg file. File.open 'foo.jpg', 'wb' do |io| io.write bytes end Something like that. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/