From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2026-03-24T05:20:41+00:00 Subject: [ruby-core:125107] [Ruby Bug#21446] StackOverflow when changing visibility in reopened refinement Issue #21446 has been updated by hsbt (Hiroshi SHIBATA). Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE to 3.2: REQUIRED, 3.3: DONE, 3.4: DONE ruby_3_3 commit:3a5fdc8f7c2f158bfad573ff4d2aef0a9cf9c0ee merged revision(s) commit:1e7cf7b2bc1f9b356b2e980e1e18548618da6363. ---------------------------------------- Bug #21446: StackOverflow when changing visibility in reopened refinement https://bugs.ruby-lang.org/issues/21446#change-116821 * Author: luke-gru (Luke Gruber) * Status: Closed * ruby -v: 3.5.0 * Backport: 3.2: REQUIRED, 3.3: DONE, 3.4: DONE ---------------------------------------- ```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/