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 BE82719C0535 for ; Tue, 1 Dec 2015 02:17:55 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id E82EFB5D853 for ; Tue, 1 Dec 2015 02:49:15 +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 EDB4118CC7AF for ; Tue, 1 Dec 2015 02:49:15 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 108A11205E1; Tue, 1 Dec 2015 02:49:14 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 22069120523 for ; Tue, 1 Dec 2015 02:49:09 +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=W6FSfmLJbsV2O7a0pgCzLQjsWlI=; b=QmNgvON2ikm0zxqP0k 6iCII8vAK01YZY1ILpAvFvXMVExwOp/57bxrIX47D7LM2u/0Jch0/dYCPydUndUP 0phQHZg/fx+BEHB44SGYftOtx1WixeaTQi0UPn6I7dTR5MoNUK5jO640okHTsE3q rFO6naXeHFMwBVRVSZPiGNrVU= Received: by filter0826p1mdw1.sendgrid.net with SMTP id filter0826p1mdw1.11500.565C8C0D1C 2015-11-30 17:49:01.370635141 +0000 UTC Received: from herokuapp.com (ec2-54-234-22-225.compute-1.amazonaws.com [54.234.22.225]) by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id vTktJv03TaS3k7U0CEGZMQ for ; Mon, 30 Nov 2015 17:49:01.381 +0000 (UTC) Date: Mon, 30 Nov 2015 17:49:01 +0000 From: melentievm@gmail.com 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: 46450 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11754 X-Redmine-Issue-Author: printercu X-Redmine-Sender: printercu 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS6neiyYkyjZEJTFli7v/B5uHghbXVrRWZzolj yo0O5kwjSHDI3N+XnmorB4cdatGaWUgeB8snbVad1d4RUn2LlQ3iVSANGx/Lg+83pmostHdFsNScsz xtDwjZgp/8CiHI++fjYo5rGFFZ8v4CIPBCfm X-ML-Name: ruby-core X-Mail-Count: 71763 Subject: [ruby-core:71763] [Ruby trunk - Bug #11754] Visibility scope is kept after lexical scope is closed 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 #11754 has been updated by Max Melentiev. ~~~ module X def self.test_def(name) define_method(name) {} end test_def :x private test_def :y def pr; end end X.test_def :z X.public_instance_methods # 2.2.2 => [:x, :y, :z] # 2.3-preview1 => [:x] ~~~ Is it ok? ---------------------------------------- Bug #11754: Visibility scope is kept after lexical scope is closed https://bugs.ruby-lang.org/issues/11754#change-55172 * Author: Max Melentiev * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- ~~~ module X def self.test_def def x; end; end private def y; end; end X.test_def X.instance_methods ~~~ In 2.2 it returns [:x], in 2.3-preview1 it returns empty array. Is it ok? -- https://bugs.ruby-lang.org/