[ruby-core:105664] [Ruby master Feature#6210] load should provide a way to specify the top-level module
From:
"jeremyevans0 (Jeremy Evans)" <noreply@...>
Date:
2021-10-18 18:32:22 UTC
List:
ruby-core #105664
Issue #6210 has been updated by jeremyevans0 (Jeremy Evans). I think this is a useful feature, and it can be implemented without any API changes/backwards compatibility issues. I submitted a pull request for it: https://github.com/ruby/ruby/pull/4986 ---------------------------------------- Feature #6210: load should provide a way to specify the top-level module https://bugs.ruby-lang.org/issues/6210#change-94164 * Author: now (Nikolai Weibull) * Status: Assigned * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) ---------------------------------------- load currently takes an optional second argument that allows you to load into an anonymous and new top-level Module. It would be nice if the second argument could also be a Module that would then be used as the top-level Module. That way one could provide a set of methods that should be available to the content being loaded without having to put them in Kernel. -- 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>