From: Pat Allan <pat@freelancing-gods.com>
To: Eric Wong <e@80x24.org>
Cc: clogger-public@bogomips.org
Subject: Re: [PATCH] Update respond_to? calls for second argument.
Date: Sun, 21 May 2017 15:10:36 +1000 [thread overview]
Message-ID: <4A30968A-A517-48F0-BA38-9E54329360EF@freelancing-gods.com> (raw)
In-Reply-To: <20170521045435.GA17029@untitled>
For reference, here’s the point where Rack became explicit about using the two arguments:
https://github.com/rack/rack/commit/5f808aa2099841e5daec6cb772a304797879ce6c
I’m not quite sure where to start with a test, I’m afraid - so if you’re able to take care of that, that’d be brilliant.
As for the C internals - I’m reading what you’ve noted, and I’m understanding at a basic level, but you’ve got the deep knowledge here, so I’m very happy to go with your decisions :)
> On 21 May 2017, at 2:54 pm, Eric Wong <e@80x24.org> wrote:
>
> Actually, there's also a rb_obj_respond_to API in Ruby 1.9+
> which could be used. It's declared in ruby/intern.h which is a
> grey area as far as continued API support goes, and it's not
> documented in doc/extension.rdoc, either.
>
> However, there is a rubyspec CAPI test for it; and I'm not sure
> the two-arg form of respond_to? is actually used by real Rack
> servers.
>
>
> Sidenote: rb_funcall* functions are always a bit slower since
> they need to go through method lookup before dispatch, and can't
> benefit from inline method caching, only global method caching.
next prev parent reply other threads:[~2017-05-21 5:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 4:01 [PATCH] Update respond_to? calls for second argument Pat Allan
2017-05-21 4:38 ` Eric Wong
2017-05-21 4:54 ` Eric Wong
2017-05-21 5:10 ` Pat Allan [this message]
2017-05-21 5:47 ` [PATCH v2] " 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/clogger/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A30968A-A517-48F0-BA38-9E54329360EF@freelancing-gods.com \
--to=pat@freelancing-gods.com \
--cc=clogger-public@bogomips.org \
--cc=e@80x24.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/clogger.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).