In article <E1AMIWa-0006dT-U4 / odie.runbox.com>,
  "T. Onoma" <transami / runbox.com> writes:

> This looks very good. Do you think commit will come soon?

I don't decided the interface yet.

> By the way, this is one case in which being able to pass more than one block might have actually been useful. you think?

There is a case.

Apart from that, this is a interesting example with variable scope.
Ruby/ProgressBar can be used as follows:

pbar = nil
open("http://...",
  :content_length_proc => lambda {|s|
    (pbar = ProgressBar.new("test", s)).file_transfer_mode if s
  },
  :progress_proc => lambda {|s|
    pbar.set s if pbar
  })

In Ruby2, `pbar = nil' can be dropped.

> Oh, I have aside question: is it possible to use open_uri to test connection speed?

Since open-uri is intended to be very high level interface, I don't
think it's suitable to measure connection speed.
-- 
Tanaka Akira