From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS11403 66.111.0.0/20 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3734E201A7 for ; Sun, 21 May 2017 05:10:39 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 862B32090D; Sun, 21 May 2017 01:10:38 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Sun, 21 May 2017 01:10:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= freelancing-gods.com; h=cc:content-transfer-encoding :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=LbNI0rjTX+0vsu9zr3rIKQZo5hdb6t4nPV07hk eKDdk=; b=Rb+IExHTFS6+OeQRgsIHaUR0yrrbRymzt58/I/4A0G4o/xGX242y5Z VXNLkz7SRsSfazVjsRZxk4tRGSpVQ291fIXWJhyW5wasNUe+fDZy2tEC5Bq37evo L1W+nksFWwIqnvvsmrYlj4EuEUSElRJzbDGyvYYfAtdKrL84564rU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=LbNI0rjTX+0vsu9zr3rIKQZo5hdb6t4nPV07hkeKDdk=; b=aRDQLOco sR68BesiTFJfSzLrvjPcNlbK3hLn4CmE3exNLWRHQfD0ohwZDXIXqtA8rlBCUTtr 1Ix489CJtMf5KdT+D8OZRk91ptxQAqwPYZ8oYxQImdgL4aX61I/+zVswAJABzPYj s8p8/qWn5KwkOE3PSSR2BnvTNT7WlZ9zNfYkbXQ8JaNIJ+xTgMw/ua0JGwcPXBRM FiELs7BwuA5APs9bczAS47L348bgMkJ52gHTycYXJ5qjfWS3UOq9WpGwwT9+Bmqx vI5FS6tHuvBgav2TjCEQO+iz3W4+Fz5tvMCW5rlPreCoGI9Ub2S6w/+9HP1NHouM l1MUnLLhhyaBdQ== X-ME-Sender: X-Sasl-enc: gxyeEI+ugvNR9g4/u9EVW8xqwYnOQoUMHn5Z5pwBYjEz 1495343438 Received: from [192.168.1.5] (58-7-140-150.dyn.iinet.net.au [58.7.140.150]) by mail.messagingengine.com (Postfix) with ESMTPA id 7F01A7E266; Sun, 21 May 2017 01:10:37 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] Update respond_to? calls for second argument. From: Pat Allan In-Reply-To: <20170521045435.GA17029@untitled> Date: Sun, 21 May 2017 15:10:36 +1000 Cc: clogger-public@bogomips.org X-Mao-Original-Outgoing-Id: 517036236.778796-d70eac349e36629d8c2015efda495bfd Content-Transfer-Encoding: quoted-printable Message-Id: <4A30968A-A517-48F0-BA38-9E54329360EF@freelancing-gods.com> References: <20170521043848.GA25750@starla> <20170521045435.GA17029@untitled> To: Eric Wong X-Mailer: Apple Mail (2.3273) List-Id: For reference, here=E2=80=99s the point where Rack became explicit about = using the two arguments: = https://github.com/rack/rack/commit/5f808aa2099841e5daec6cb772a304797879ce= 6c I=E2=80=99m not quite sure where to start with a test, I=E2=80=99m = afraid - so if you=E2=80=99re able to take care of that, that=E2=80=99d = be brilliant. As for the C internals - I=E2=80=99m reading what you=E2=80=99ve noted, = and I=E2=80=99m understanding at a basic level, but you=E2=80=99ve got = the deep knowledge here, so I=E2=80=99m very happy to go with your = decisions :) > On 21 May 2017, at 2:54 pm, Eric Wong wrote: >=20 > 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. >=20 > 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. >=20 >=20 > 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.