On Fri, Feb 10, 2012 at 11:18 PM, Edward Stembler <ejstembler / mac.com> wrot=
e:
> Anyone know how to save a Net::BER::BerIdentifiedString as a binary
> file?
>
> I've tried .dump, but that did not work. =A0I 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


--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/