From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 3EF631F66F for ; Tue, 17 Nov 2020 12:21:26 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 43337120A47; Tue, 17 Nov 2020 21:20:38 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id F3893120A3C for ; Tue, 17 Nov 2020 21:20:35 +0900 (JST) Received: by filterdrecv-p3iad2-5dc87598f5-jx7dk with SMTP id filterdrecv-p3iad2-5dc87598f5-jx7dk-18-5FB3C015-47 2020-11-17 12:20:37.567263669 +0000 UTC m=+56991.982315428 Received: from herokuapp.com (unknown) by ismtpd0098p1iad2.sendgrid.net (SG) with ESMTP id pIAbI9UBTX6DNCyEHmJq1w for ; Tue, 17 Nov 2020 12:20:37.523 +0000 (UTC) Date: Tue, 17 Nov 2020 12:20:37 +0000 (UTC) From: nobu@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 76768 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 11213 X-Redmine-Issue-Author: ko1 X-Redmine-Issue-Assignee: matz X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?q8Dly+pU2+3ektTtZVXgZtbJPXwqo7p86jCsvYTW4ByLOeAnBqzxQN=2FZmAiJDk?= =?us-ascii?Q?fTI7CAjyRAQ4OOJ3AKDkaMSPGDl=2FtS6vJ0uEfXH?= =?us-ascii?Q?5ifDjMBsK5Gf=2F55eKsBZbqTDSLEFysqVhksEupv?= =?us-ascii?Q?MkHi9KkpfwpLFuVtBt6HeO5hUVk5yB9k8WcB9R9?= =?us-ascii?Q?CbasWazYOGb0lBHnIU0mylu8JnqhPsfdWcwTH9v?= =?us-ascii?Q?jbQlosErYUkU=2FBz0s=3D?= To: ruby-dev@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-dev X-Mail-Count: 50971 Subject: [ruby-dev:50971] [Ruby master Bug#11213] defined?(super) ignores respond_to_missing? X-BeenThere: ruby-dev@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: "Ruby developers \(Japanese\)" List-Id: "Ruby developers \(Japanese\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-dev-bounces@ruby-lang.org Sender: "ruby-dev" Issue #11213 has been updated by nobu (Nobuyoshi Nakada). https://github.com/ruby/ruby/pull/3777 ---------------------------------------- Bug #11213: defined?(super) ignores respond_to_missing? https://bugs.ruby-lang.org/issues/11213#change-88543 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * ruby -v: 2.3dev * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ```ruby class C0 def method_missing *args p [:method_missing] + args end def respond_to_missing? *args true end end class C1 < C0 def foo super defined?(super) end end p C1.new.foo ``` This script prints ``` [:method_missing, :foo] nil ``` In this case, we can call super, but defined? returns nil. It should be a bug. -- https://bugs.ruby-lang.org/