2009/7/8 Andy P. <andycootlapin / hotmail.fr>: > Glenn Jackman wrote: >> At 2009-07-08 05:52AM, "Andy P." wrote: >>> ¨Βεμμο >>> >>> ¨Β§ν τςωιξη το ηεχεπαηε χιδτοπεξυςι χιδττθισ γοδε >>> >>> ¨Βερυιςε §οπεξυςι§ >>> ¨Βπεξ¨ΆθττπΊ――χχχ®ηοοημε®γονΆ© ϋόσςγό >>> ¨Βπεξ¨Άτεστ®θτνΆ¬ΆχβΆ© ϋόδστό >> >> You're looking for the class method in File: >> >> ¨Βιμε®οπεξ¨Άτεστ®θτνΆ¬ΆχβΆϋόδστό > > > Yes but it don't work with : > open("www.google.com") {|src| > > I'm not trying that in irb, I imported all the files of uri, open-uri, > but it don't work. What is the full name of the open uri method who > creates a TempFile ? > Must I import other files ? Can you show specific code and errors? As for Andrew, this worked for me out of the box: 09:26:33 Temp$ irb19 Ruby version 1.9.1 irb(main):001:0> require 'open-uri' => true irb(main):002:0> open("http://www.google.com") {|src| irb(main):003:1* open("test.htm","wb") {|dst| irb(main):004:2* dst.write(src.read) irb(main):005:2> } irb(main):006:1> } => 5337 irb(main):007:0> exit 09:26:54 Temp$ wc test.htm 9 190 5337 test.htm 09:27:02 Temp$ Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/