Issue #11754 has been updated by Jean-Philippe Doyle.

ruby -v set to ruby 2.3.0preview1 (2015-11-11 trunk 52539) [x86_64-darwin13]

To provide some context, this creates issues with two gems I am using that have dynamically defined methods (that now seems to be incorrectly private in 2.3.0preview1) :

- paranoia (`really_destroy!` method defined in https://github.com/rubysherpas/paranoia/blob/rails4/lib/paranoia.rb#L185-L190)
- money (all methods defined in https://github.com/RubyMoney/money/blob/master/lib/money/money/formatting.rb#L4-L14)

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

* Author: Max Melentiev
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0preview1 (2015-11-11 trunk 52539) [x86_64-darwin13]
* 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/