From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.142.191.1 with SMTP id o1cs258375wff; Wed, 9 Dec 2009 14:59:16 -0800 (PST) Received: from mr.google.com ([10.115.81.10]) by 10.115.81.10 with SMTP id i10mr5717916wal.26.1260399556018 (num_hops = 1); Wed, 09 Dec 2009 14:59:16 -0800 (PST) Received: by 10.115.81.10 with SMTP id i10mr777311wal.26.1260399554447; Wed, 09 Dec 2009 14:59:14 -0800 (PST) X-BeenThere: rack-devel@googlegroups.com Received: by 10.114.188.15 with SMTP id l15ls410010waf.3.p; Wed, 09 Dec 2009 14:59:13 -0800 (PST) Received: by 10.114.105.11 with SMTP id d11mr2179409wac.21.1260399553067; Wed, 09 Dec 2009 14:59:13 -0800 (PST) Received: by 10.114.105.11 with SMTP id d11mr2179408wac.21.1260399553047; Wed, 09 Dec 2009 14:59:13 -0800 (PST) Return-Path: Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by gmr-mx.google.com with ESMTP id 38si45687pxi.3.2009.12.09.14.59.12; Wed, 09 Dec 2009 14:59:12 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.209 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) client-ip=209.85.219.209; Received: by mail-ew0-f209.google.com with SMTP id 1so4970553ewy.28 for ; Wed, 09 Dec 2009 14:59:12 -0800 (PST) Received: by 10.213.104.10 with SMTP id m10mr1307359ebo.62.1260399551794; Wed, 09 Dec 2009 14:59:11 -0800 (PST) Return-Path: Received: from ibc-laptop.localnet ([212.230.46.89]) by mx.google.com with ESMTPS id 14sm194877ewy.7.2009.12.09.14.59.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Dec 2009 14:59:11 -0800 (PST) From: =?utf-8?q?I=C3=B1aki_Baz_Castillo?= To: rack-devel@googlegroups.com Subject: Why env.object_id is different in each middleware? Date: Wed, 9 Dec 2009 23:59:08 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.28-16-generic; KDE/4.3.2; x86_64; ; ) MIME-Version: 1.0 Message-Id: <200912092359.08240.ibc@aliax.net> X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.219.209 is neither permitted nor denied by best guess record for domain of ibc@aliax.net) smtp.mail=ibc@aliax.net X-Original-Sender: ibc@aliax.net 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/5d93266373a372ea X-Message-Url: http://groups.google.com/group/rack-devel/msg/1b66d2487942569a Sender: rack-devel@googlegroups.com List-Unsubscribe: , List-Subscribe: , Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I've realized that env.object_id is different when inspecting it in eac= h=20 middleware or final application in a Rack builder. How is possible? In my case I use this simple builder: =2D-------------------------------------- ::Rack::Builder.new do use ::Clogger, ... map "/", &::MyApp.handle_request end class MyApp def self.handle_request proc do run Proc.new { |env| ::MyApp::Request.handle(env) } end end end =2D-------------------------------------- If I check env.object_id into Clogger call method, and also into=20 MyApp.ahndle_request, they have different values. Since env is a hash I cannot understand why its object_id changes. Any=20 explanatuion for it? This explains that when I change env[XXX] into my final appplication=20 MyApp.handle_request the change doesn't exist after calling resp =3D @app.call(env) in the first middleware. Thanks a lot. =2D-=20 I=C3=B1aki Baz Castillo