From: rubyfan Date: 2000-11-15T00:40:02+09:00 Subject: [ruby-talk:6359] break and http Why doesn't break exit the iterator with http? This prints out "got stuff" over and over. require 'net/http' host='127.0.0.1' url='/s.html' http = Net::HTTP.new(host) http.get(url) {|stuff| puts "got stuff" break } puts "all done" This only prints "got stuff" once: file='/home/httpd/html/s.html' testfile=File.open(file) testfile.each {|stuff| puts "got stuff" break } puts "all done"