From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.140.140.3 with SMTP id n3cs334829rvd; Sat, 6 Mar 2010 02:20:27 -0800 (PST) Received-SPF: pass (google.com: domain of 3aSySSwYKCnMYfeXcZgYljZfe.eciRTb-UVmVcXffXcVXiflgj.Tfd@groups.bounces.google.com designates 10.101.137.22 as permitted sender) client-ip=10.101.137.22; Authentication-Results: mr.google.com; spf=pass (google.com: domain of 3aSySSwYKCnMYfeXcZgYljZfe.eciRTb-UVmVcXffXcVXiflgj.Tfd@groups.bounces.google.com designates 10.101.137.22 as permitted sender) smtp.mail=3aSySSwYKCnMYfeXcZgYljZfe.eciRTb-UVmVcXffXcVXiflgj.Tfd@groups.bounces.google.com; dkim=pass header.i=3aSySSwYKCnMYfeXcZgYljZfe.eciRTb-UVmVcXffXcVXiflgj.Tfd@groups.bounces.google.com Received: from mr.google.com ([10.101.137.22]) by 10.101.137.22 with SMTP id p22mr845854ann.40.1267870826671 (num_hops = 1); Sat, 06 Mar 2010 02:20:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:mime-version:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-original-authentication-results:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:x-thread-url:x-message-url:sender:list-subscribe :list-unsubscribe:content-type:content-transfer-encoding; bh=8iHcVIMYbQXMuN0Dcs9WEEPlYxFtuUDTLJchc8dw0/w=; b=gVh/+Jk8Qyt0jLqcu7UI1v0RDicXb3xUtWIYGL9pgNlo7m6Y5b2B+cZuP8RrYWU12H hdEJ88FMBRR5BuvUTJ4kN73n9aBLGCUno2wan11DSMwsWNS3Nah29/YFA7iWShLZW1cN MKROoz/1tF4xk2v3qrnPoKWhoB6WwnQxWqXOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:in-reply-to:x-ip :references:user-agent:x-http-useragent:message-id:subject:from:to :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; b=QMl9IM0l/7155sjdq+RLitXapQo6V5b6Pp8nHp+WUh8fGE9Op84DHhKZsrDEv1tnJl clMGU0IvAN1GKazgGfpMyVEjlcRWd6DHONkIKGRQR211Ciw5FHzYKqEpuc8nL5kvghGP +jPTBopvQKm2tL4/hHHFN2hBCbydpPP/OjYNc= Received: by 10.101.137.22 with SMTP id p22mr66399ann.40.1267870825438; Sat, 06 Mar 2010 02:20:25 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.90.41.34 with SMTP id o34ls655869ago.2.p; Sat, 06 Mar 2010 02:20:24 -0800 (PST) Received: by 10.90.6.10 with SMTP id 10mr2585114agf.8.1267870824321; Sat, 06 Mar 2010 02:20:24 -0800 (PST) Received: by 10.90.6.10 with SMTP id 10mr2585113agf.8.1267870824299; Sat, 06 Mar 2010 02:20:24 -0800 (PST) Return-Path: Received: from mail-yw0-f137.google.com (mail-yw0-f137.google.com [209.85.211.137]) by gmr-mx.google.com with ESMTP id 24si413535ywh.10.2010.03.06.02.20.23; Sat, 06 Mar 2010 02:20:23 -0800 (PST) Received-SPF: pass (google.com: domain of hongli@phusion.nl designates 209.85.211.137 as permitted sender) client-ip=209.85.211.137; Received: by ywh1 with SMTP id 1so6095432ywh.3 for ; Sat, 06 Mar 2010 02:20:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.150.176.21 with SMTP id y21mr90742ybe.30.1267870823878; Sat, 06 Mar 2010 02:20:23 -0800 (PST) Date: Sat, 6 Mar 2010 02:20:21 -0800 (PST) In-Reply-To: X-IP: 77.250.47.10 References: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6,gzip(gfe),gzip(gfe) Message-ID: Subject: Re: Not cleaning up tempfiles for multipart? From: Hongli Lai To: Rack Development X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of hongli@phusion.nl designates 209.85.211.137 as permitted sender) smtp.mail=hongli@phusion.nl X-Original-Sender: hongli@phusion.nl Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: X-Thread-Url: http://groups.google.com/group/rack-devel/t/6eb2bc7a1f8c072c X-Message-Url: http://groups.google.com/group/rack-devel/msg/32d5f5cd25e7cf17 Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mar 5, 3:47=A0pm, Charles Oliver Nutter wrote: > I'm also confused by this code in rewindable_input.rb: > > =A0 =A0 class Tempfile < ::Tempfile > =A0 =A0 =A0 def _close > =A0 =A0 =A0 =A0 @tmpfile.close if @tmpfile > =A0 =A0 =A0 =A0 @data[1] =3D nil if @data > =A0 =A0 =A0 =A0 @tmpfile =3D nil > =A0 =A0 =A0 end > =A0 =A0 end > > the original _close (in 1.8.7) does this, which should be functionally > equivalent: > > =A0 def _close =A0 =A0# :nodoc: > =A0 =A0 @tmpfile.close if @tmpfile > =A0 =A0 @tmpfile =3D nil > =A0 =A0 @data[1] =3D nil if @data > =A0 end > > Is this patching a bug from 1.8.6? Yes. The following code doesn't work on 1.8.6: t =3D Tempfile.new('foo') t.unlink t.close # <--- crash, because of the early unlink