From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id CB44217DE6DC for ; Mon, 9 Mar 2015 07:38:34 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 559A8B5D8CF for ; Mon, 9 Mar 2015 07:44:11 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 18C1297A82B for ; Mon, 9 Mar 2015 07:44:12 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fFGR1uZCLdqc for ; Mon, 9 Mar 2015 07:44:11 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 7CD5F97A820 for ; Mon, 9 Mar 2015 07:44:11 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 1FEB995241B for ; Mon, 9 Mar 2015 07:44:09 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 7BF371204AC; Mon, 9 Mar 2015 07:44:05 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 5C2811204A1 for ; Mon, 9 Mar 2015 07:44:00 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=LGJ8uymuRbPmxYsy4Ap3lrt4Vuc=; b=j6XULu/INvmiDjUeHY LrHyMrC955lFg/J+aW32ANr8hwsfmObZEce08jXV8gTGFI1XQdQoXsBq+I6D3F3U 7IWRbFtYNOGrq7EJr+sR8VkjTjWI517yELgfvTkBMQ17PAGet2Q6PcN+aEMx1Rxl 7tAmCLV0S0x9rUqh7FHej/hoE= Received: by filter0024p1mdw1.sendgrid.net with SMTP id filter0024p1mdw1.30477.54FCD0A92 2015-03-08 22:43:54.417602451 +0000 UTC Received: from ismtpd-018.iad1.sendgrid.net ([UNAVAILABLE]. [10.42.2.93]) by 10.42.243.103:2500 (trex/5.2.14); Sun, 08 Mar 2015 22:43:55 GMT Received: from herokuapp.com (ec2-54-83-79-153.compute-1.amazonaws.com [54.83.79.153]) by ismtpd-018 (SG) with ESMTP id 14bfb8f18b3.b55.1c66f0 for ; Sun, 08 Mar 2015 22:43:54 +0000 (UTC) Date: Sun, 08 Mar 2015 22:43:53 +0000 From: ko1@atdot.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 42896 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 10929 X-Redmine-Issue-Author: trans X-Redmine-Issue-Assignee: matz X-Redmine-Sender: ko1 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7bkNCnzTxUngdxV8KD0513laARLoyRH/jvox 95LR9bpikR4Ueu5UXnBc09pRmGFC3JkvPhaW5ZBzAT5C+4xgXXpWyhnFqt2HwDhKtKHVSlKVg2YZT8 Op5wM6mE21PBNmtnZxtJ1v8eF8lIfdyOwVPf X-ML-Name: ruby-core X-Mail-Count: 68462 Subject: [ruby-core:68462] [Ruby trunk - Bug #10929] NilClass#to_proc and & don't mix? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10929 has been updated by Koichi Sasada. Assignee set to Yukihiro Matsumoto I'm not sure we support it or not. For me, it is easy to understand that passing `nil` is special case, passing no block. ---------------------------------------- Bug #10929: NilClass#to_proc and & don't mix? https://bugs.ruby-lang.org/issues/10929#change-51807 * Author: Thomas Sawyer * Status: Open * Priority: Low * Assignee: Yukihiro Matsumoto * ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- This is sort of like a "who would ever care" kind of bug. Nonetheless technically it seems like it is one. So I thought it best that I report it just the same. ~~~ class NilClass def to_proc Proc.new{ |*x| nil } end end def f(&b) b.call(1) end f(&nil) => NoMethodError: undefined method `call' for nil:NilClass ~~~ (Maybe it was fixed already. Filing out this issue reminded me I need to update my version of Ruby.) ---Files-------------------------------- block_from_nil.patch (771 Bytes) -- https://bugs.ruby-lang.org/