[#109095] [Ruby master Misc#18888] Migrate ruby-lang.org mail services to Google Domains and Google Workspace — "shugo (Shugo Maeda)" <noreply@...>
Issue #18888 has been reported by shugo (Shugo Maeda).
16 messages
2022/06/30
[ruby-core:108994] [Ruby master Bug#18600] Aliased method visibility issue on Ruby 3.1
From:
"nagachika (Tomoyuki Chikanaga)" <noreply@...>
Date:
2022-06-18 07:01:06 UTC
List:
ruby-core #108994
Issue #18600 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED to 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE ruby_3_1 9d11ddcf6ace6676cea7cac836b4302240e3efb4 merged revision(s) 0c6e24d102e894a7211a596e6aa95828b1cf4406. ---------------------------------------- Bug #18600: Aliased method visibility issue on Ruby 3.1 https://bugs.ruby-lang.org/issues/18600#change-98105 * Author: gmcgibbon (Gannon McGibbon) * Status: Closed * Priority: Normal * ruby -v: 3.1.0 * Backport: 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONE ---------------------------------------- It seems methods on classes that were originally private in the parent and made public in the child can no longer be aliased correctly: ``` class C public :system alias_method :bar, :system alias_method :system, :bar end p RUBY_VERSION p [C.new.respond_to?(:system), C.new.respond_to?(:system, true)] ``` On Ruby <= 3.0.3, this returns `[true, true]`, but on Ruby >= 3.1.0 this returns `[false, true]`. The aliased method seems to revert visibility to the parent. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>