From: "Eregon (Benoit Daloze) via ruby-core" Date: 2025-05-10T12:22:43+00:00 Subject: [ruby-core:121986] [Ruby Bug#21317] Namespaces leak with object IDs Issue #21317 has been updated by Eregon (Benoit Daloze). Seems very related to https://bugs.ruby-lang.org/issues/21322 so let's keep this one closed and discuss there. ---------------------------------------- Bug #21317: Namespaces leak with object IDs https://bugs.ruby-lang.org/issues/21317#change-113104 * Author: fxn (Xavier Noria) * Status: Closed * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- Namespaces are not transparent for this program ```ruby if mod1.object_id == mod2.object_id mod1.constants == mod2.constants end ``` because it may fail for `mod1 = Object; mod2 = ns::Object`, which have the same object ID. -- 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/