* [ruby-core:122558] [Ruby Bug#21446] StackOverflow when changing visibility in reopened refinement
@ 2025-06-19 17:16 luke-gru (Luke Gruber) via ruby-core
2025-06-20 0:16 ` [ruby-core:122560] " nobu (Nobuyoshi Nakada) via ruby-core
0 siblings, 1 reply; 2+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2025-06-19 17:16 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #21446 has been reported by luke-gru (Luke Gruber).
----------------------------------------
Bug #21446: StackOverflow when changing visibility in reopened refinement
https://bugs.ruby-lang.org/issues/21446
* Author: luke-gru (Luke Gruber)
* Status: Open
* ruby -v: 3.5.0
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
```ruby
class A
def a
:a
end
end
class B < A
end
module R
refine B do
private :a
end
end
module R
refine B do
public :a
end
end
using R
B.new.a # StackOverflow
```
I would expect it to change the visibility, not to overflow the stack.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:122560] [Ruby Bug#21446] StackOverflow when changing visibility in reopened refinement
2025-06-19 17:16 [ruby-core:122558] [Ruby Bug#21446] StackOverflow when changing visibility in reopened refinement luke-gru (Luke Gruber) via ruby-core
@ 2025-06-20 0:16 ` nobu (Nobuyoshi Nakada) via ruby-core
0 siblings, 0 replies; 2+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2025-06-20 0:16 UTC (permalink / raw)
To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)
Issue #21446 has been updated by nobu (Nobuyoshi Nakada).
It does not seem to need to reopen the refinement.
Reproduces just by changing visibility twice.
```ruby
module R
refine B do
private :a
public :a
end
end
```
----------------------------------------
Bug #21446: StackOverflow when changing visibility in reopened refinement
https://bugs.ruby-lang.org/issues/21446#change-113791
* Author: luke-gru (Luke Gruber)
* Status: Open
* ruby -v: 3.5.0
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
```ruby
class A
def a
:a
end
end
class B < A
end
module R
refine B do
private :a
end
end
module R
refine B do
public :a
end
end
using R
B.new.a # StackOverflow
```
I would expect it to change the visibility, not to overflow the stack.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-20 0:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-19 17:16 [ruby-core:122558] [Ruby Bug#21446] StackOverflow when changing visibility in reopened refinement luke-gru (Luke Gruber) via ruby-core
2025-06-20 0:16 ` [ruby-core:122560] " nobu (Nobuyoshi Nakada) via ruby-core
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 NNTP newsgroup(s).