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 C1C361940BDF for ; Thu, 11 Jun 2015 01:03:22 +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 284B7B5D89A for ; Thu, 11 Jun 2015 01:24:27 +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 4661397A834 for ; Thu, 11 Jun 2015 01:24:28 +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 UxoQbwn-rtVS for ; Thu, 11 Jun 2015 01:24:28 +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 0B1BC97A826 for ; Thu, 11 Jun 2015 01:24:28 +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 11690952408 for ; Thu, 11 Jun 2015 01:24:24 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 356F1120433; Thu, 11 Jun 2015 01:24:24 +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 7C54F120036 for ; Thu, 11 Jun 2015 01:24:20 +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=L8wN3+iD3NA6+YuGM4bdGElMjTo=; b=EdmHymGeJ570dzD+Qm 4vl1oYIpJWZELY49PEiEMPIExknjDxqLZwhCFmknWUjEVKGH+9sihxifa7DEokFp m0yxDyhxU1qBvT9Eq3qATarLtXiWHJrEo5v6O6wgH8cM9ZiOn1FpeN/1jKPFyxGz 1x8061oT2QnQaFQI0WaQX4+/w= Received: by filter0441p1mdw1.sendgrid.net with SMTP id filter0441p1mdw1.29271.557864AED 2015-06-10 16:24:14.702600922 +0000 UTC Received: from herokuapp.com (ec2-54-146-202-156.compute-1.amazonaws.com [54.146.202.156]) by ismtpd-035 (SG) with ESMTP id 14dde4949e6.8e5.611f04 for ; Wed, 10 Jun 2015 16:24:14 +0000 (UTC) Date: Wed, 10 Jun 2015 16:24:14 +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: 44011 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11246 X-Redmine-Issue-Author: ko1 X-Redmine-Issue-Assignee: shugo 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: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4rwIRqdez8X0IIMLz1vcGFxCrszhTlN0Ribv iI/UM1U0C+xQ78cKHNtydgG5o2UlsNNqsmDRJ7+F/DFNtj6Gi3HGnSBMc3mVjBdTDQAeskEBMmHX0Z WbYFTn/StGsI5rvglZaXKxoAOfzivLQB7fm0 X-ML-Name: ruby-core X-Mail-Count: 69516 Subject: [ruby-core:69516] [Ruby trunk - Bug #11246] [Open] refine block doesn't respect "lexical" refinement information 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 #11246 has been reported by Koichi Sasada. ---------------------------------------- Bug #11246: refine block doesn't respect "lexical" refinement information https://bugs.ruby-lang.org/issues/11246 * Author: Koichi Sasada * Status: Open * Priority: Normal * Assignee: Shugo Maeda * ruby -v: ruby 2.3dev * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- The following program making two refinements refine class C. ```ruby class C def foo p C end end module R1 refine C do def foo p R1 super end end end using R1 # 1 module R2 using R1 # 2 refine C do # using R1 # 3 def bar C.new.foo end end end using R2 C.new.bar ``` Without `using R1 # 3`, `C#foo` was called in `R2::C#bar`. By `using R21 #1` and `#2`, we declared that this lexical scope should use R1. However, it seems that this declaration is ignored. Is it an intentional behavior? -- https://bugs.ruby-lang.org/