* [ruby-core:71762] [Ruby trunk - Bug #11754] [Open] Visibility scope is kept after lexical scope is closed
[not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
@ 2015-11-30 17:42 ` melentievm
2015-11-30 17:49 ` [ruby-core:71763] [Ruby trunk - Bug #11754] " melentievm
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: melentievm @ 2015-11-30 17:42 UTC (permalink / raw)
To: ruby-core
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:71763] [Ruby trunk - Bug #11754] Visibility scope is kept after lexical scope is closed
[not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
2015-11-30 17:42 ` [ruby-core:71762] [Ruby trunk - Bug #11754] [Open] Visibility scope is kept after lexical scope is closed melentievm
@ 2015-11-30 17:49 ` melentievm
2015-11-30 21:13 ` [ruby-core:71764] " jeanphilippe.doyle
2015-12-07 7:24 ` [ruby-core:71881] " ko1
3 siblings, 0 replies; 4+ messages in thread
From: melentievm @ 2015-11-30 17:49 UTC (permalink / raw)
To: 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:71764] [Ruby trunk - Bug #11754] Visibility scope is kept after lexical scope is closed
[not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
2015-11-30 17:42 ` [ruby-core:71762] [Ruby trunk - Bug #11754] [Open] Visibility scope is kept after lexical scope is closed melentievm
2015-11-30 17:49 ` [ruby-core:71763] [Ruby trunk - Bug #11754] " melentievm
@ 2015-11-30 21:13 ` jeanphilippe.doyle
2015-12-07 7:24 ` [ruby-core:71881] " ko1
3 siblings, 0 replies; 4+ messages in thread
From: jeanphilippe.doyle @ 2015-11-30 21:13 UTC (permalink / raw)
To: ruby-core
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:71881] [Ruby trunk - Bug #11754] Visibility scope is kept after lexical scope is closed
[not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
` (2 preceding siblings ...)
2015-11-30 21:13 ` [ruby-core:71764] " jeanphilippe.doyle
@ 2015-12-07 7:24 ` ko1
3 siblings, 0 replies; 4+ messages in thread
From: ko1 @ 2015-12-07 7:24 UTC (permalink / raw)
To: ruby-core
Issue #11754 has been updated by Koichi Sasada.
Assignee set to Koichi Sasada
----------------------------------------
Bug #11754: Visibility scope is kept after lexical scope is closed
https://bugs.ruby-lang.org/issues/11754#change-55284
* Author: Max Melentiev
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-07 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11754.20151130174201@ruby-lang.org>
2015-11-30 17:42 ` [ruby-core:71762] [Ruby trunk - Bug #11754] [Open] Visibility scope is kept after lexical scope is closed melentievm
2015-11-30 17:49 ` [ruby-core:71763] [Ruby trunk - Bug #11754] " melentievm
2015-11-30 21:13 ` [ruby-core:71764] " jeanphilippe.doyle
2015-12-07 7:24 ` [ruby-core:71881] " ko1
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).