Project

General

Profile

Backport #3309 ยป test_get.rb

Leak demo using Net::HTTP.get_response. - phiggins (Pete Higgins), 05/18/2010 09:45 AM

 
1
require 'net/http'
2
require 'uri'
3

    
4
puts "PID: #{Process.pid}"
5
puts 'before' ; gets
6

    
7
Net::HTTP.get_response( URI("http://google.com") )
8

    
9
puts 'after' ; gets
10

    
11
GC.start
12

    
13
puts "after GC" ; gets