2012/5/16 Christoph Pilka <
c.p...@asconix.com>:
> Hi folks. I think it's a newbie question but why doesn't the EM loop
> get the same data struc the callback in the function above returns?
>
https://gist.github.com/2709886 line 26 and 39 *confused*
What is so extrange?
response = resp.response
json = StringIO.new response
parser = Yajl::Parser.new
pool.proxies = parser.parse(json)
puts pool.proxies.class # -> returns Array
pool.proxies is the result of a JSON parsing and it's an array (it
could also be a Hash).
pool = MassiveProxy::ProxyPool.get(100)
pool.callback do |p|
puts p.class # -> returns EventMachine::HttpClient
p is an elemento within pool, which is a EM::HttpClient.
*Why* should both be the same class?
--
Iñaki Baz Castillo
<
i...@aliax.net>