ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: melentievm@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:71762] [Ruby trunk - Bug #11754] [Open] Visibility scope is kept after lexical scope is closed
Date: Mon, 30 Nov 2015 17:42:02 +0000	[thread overview]
Message-ID: <redmine.issue-11754.20151130174201.4c9c1c5823bdc3fd@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11754.20151130174201@ruby-lang.org

Issue #11754 has been reported by Max Melentiev.

----------------------------------------
Bug #11754: Visibility scope is kept after lexical scope is closed
https://bugs.ruby-lang.org/issues/11754

* 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/

       reply	other threads:[~2015-11-30 17:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
2015-11-30 17:42 ` melentievm [this message]
2015-11-30 17:49 ` [ruby-core:71763] [Ruby trunk - Bug #11754] Visibility scope is kept after lexical scope is closed melentievm
2015-11-30 21:13 ` [ruby-core:71764] " jeanphilippe.doyle
2015-12-07  7:24 ` [ruby-core:71881] " ko1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11754.20151130174201.4c9c1c5823bdc3fd@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).