raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.org
Subject: Re: [PATCH] Add method_missing to Raindrops::Middleware::Proxy
Date: Thu, 17 May 2012 19:35:08 -0700	[thread overview]
Message-ID: <20120518023508.GA31625@dcvr.yhbt.net> (raw)
In-Reply-To: CAO1NZApFZa_SQk12ZZOo1ZTukfnxMsZ=-NG7aZ8f1v8xL6quyA@mail.gmail.com

Ben Somers <somers.ben@gmail.com> 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)


  reply	other threads:[~2012-05-18  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  1:46 [PATCH] Add method_missing to Raindrops::Middleware::Proxy Ben Somers
2012-05-18  2:35 ` Eric Wong [this message]
2012-05-18  3:56   ` Ben Somers
2012-05-18  4:27     ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120518023508.GA31625@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/raindrops.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).