* [ruby-core:99371] [Ruby master Bug#11022] opening an eigenclass does not change the class variable definition context
[not found] <redmine.issue-11022.20150401060349.8741@ruby-lang.org>
@ 2020-07-28 20:19 ` merch-redmine
2020-11-20 6:37 ` [ruby-core:100959] " matz
1 sibling, 0 replies; 2+ messages in thread
From: merch-redmine @ 2020-07-28 20:19 UTC (permalink / raw
To: ruby-core
Issue #11022 has been updated by jeremyevans0 (Jeremy Evans).
@matz considered this during the September 2019 and December 2019 developers meetings, but has not yet made a decision on it.
----------------------------------------
Bug #11022: opening an eigenclass does not change the class variable definition context
https://bugs.ruby-lang.org/issues/11022#change-86777
* Author: bughit (bug hit)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
```ruby
module Mod1
class << Object.new
C = 1
@@cv = 1
p Module.nesting,
constants(false),
class_variables(false),
Mod1.class_variables(false)
end
end
```
```
[#<Class:#<Object:0xb6913d98>>, Mod1]
[:C]
[]
[:@@cv]
```
Shouldn't class var resolution be relative to the current lexical class (Module.nexting.first)?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:100959] [Ruby master Bug#11022] opening an eigenclass does not change the class variable definition context
[not found] <redmine.issue-11022.20150401060349.8741@ruby-lang.org>
2020-07-28 20:19 ` [ruby-core:99371] [Ruby master Bug#11022] opening an eigenclass does not change the class variable definition context merch-redmine
@ 2020-11-20 6:37 ` matz
1 sibling, 0 replies; 2+ messages in thread
From: matz @ 2020-11-20 6:37 UTC (permalink / raw
To: ruby-core
Issue #11022 has been updated by matz (Yukihiro Matsumoto).
Status changed from Assigned to Rejected
I am not a big fan of this behavior, but I don't think class variables are worth breaking the existing code for the sake of preference.
So I reject the proposal.
Matz.
----------------------------------------
Bug #11022: opening an eigenclass does not change the class variable definition context
https://bugs.ruby-lang.org/issues/11022#change-88616
* Author: bughit (bug hit)
* Status: Rejected
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [i686-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
```ruby
module Mod1
class << Object.new
C = 1
@@cv = 1
p Module.nesting,
constants(false),
class_variables(false),
Mod1.class_variables(false)
end
end
```
```
[#<Class:#<Object:0xb6913d98>>, Mod1]
[:C]
[]
[:@@cv]
```
Shouldn't class var resolution be relative to the current lexical class (Module.nexting.first)?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-20 6:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-11022.20150401060349.8741@ruby-lang.org>
2020-07-28 20:19 ` [ruby-core:99371] [Ruby master Bug#11022] opening an eigenclass does not change the class variable definition context merch-redmine
2020-11-20 6:37 ` [ruby-core:100959] " matz
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).