On Thu, Apr 2, 2015 at 12:38 PM, Bar Hofesh <bar.hofesh / safe-t.com> wrote:

>  Hi Guys,
>
> What do you think about this:
> https://gist.github.com/bararchy/5821d4227c95cb865872
>
> Any ideas on how to improve it ?
>

    data = ''.force_encoding Encoding::BINARY

    while ( d = socket.read_nonblock(16_384) )
      data << d
    end



-- 
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can -
without end}
http://blog.rubybestpractices.com/