From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: Re: [PATCH] Add method_missing to Raindrops::Middleware::Proxy Date: Thu, 17 May 2012 19:35:08 -0700 Message-ID: <20120518023508.GA31625@dcvr.yhbt.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337308532 5500 80.91.229.3 (18 May 2012 02:35:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 18 May 2012 02:35:32 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Fri May 18 04:35:31 2012 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:69 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SVD2Q-0003Cy-U7 for gclrrg-raindrops@m.gmane.org; Fri, 18 May 2012 04:35:31 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id B351B21DBA3 for ; Fri, 18 May 2012 02:43:04 +0000 (UTC) Ben Somers wrote: > This enables it to behave more like a Rack > BodyProxy would, delegating methods to its body > object when it does not implement them itself. > (Also includes a minor grammar fix to a comment.) > --- > Here you go! Hopefully this is a patch format you appreciate? Thanks! (minor nits below) > Guidelines are a little less clear than on unicorn :p. Sorry :x I try to follow the contribution guidelines as git itself and I think the README makes that much clear. Patches to clarify what you think needs clarifying also appreciated :) I tend to be less good (and less picky :) than Junio when it comes to grammar, though. > --- a/lib/raindrops/middleware/proxy.rb > +++ b/lib/raindrops/middleware/proxy.rb > end > + > + # Rack::BodyProxy objects use +method_missing+ to delegate methods > + # to their bodies I don't think the comment makes sense without the context of this email thread/commit message. Perhaps the following? # Avoid breaking users of non-standard extensions (e.g. #body) # Rack::BodyProxy does the same. > + def method_missing(*args, &block) > + @body.send(*args, &block) > + end > + > end I don't think I usually add a blank line between after the last method and the end of a class/module. Trivial fix on my end. Let me know if you think my comment for method_missing is better. (often things I say which I /think/ makes sense... don't :D)