Project

General

Profile

Actions

Bug #11754

closed

Visibility scope is kept after lexical scope is closed

Added by printercu (Max Melentiev) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.3.0preview1 (2015-11-11 trunk 52539) [x86_64-darwin13]
[ruby-core:71762]

Description

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?


Related issues 2 (1 open1 closed)

Related to Ruby master - Feature #11665: Support nested functions for better code organizationOpenActions
Related to Ruby master - Bug #13249: Access modifiers don't have an effect inside class methods in Ruby >= 2.3Closednobu (Nobuyoshi Nakada)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0