rapid7/metasploit-framework — pull request #843 by limhoff-r7 (2012-10-01 18:22:43+00:00)
Title: Support active_support/dependencies by naming wrapper modules.

This fixes a problem with using active_support/dependencies because when the const_missing override introduced tried to resolve constants in a Metasploit3 class in a module, it tried to look up constants inside the anonymous wrapper module created with Module.new. Module.new by default as a name that is not a valid constant name because it's an inspection string that embeds the memory address. This pull request names the previously anonymous module based on the reference name for the module (to prevent collisions) and refactors Msf::ModuleManager so there is less code duplication and to ensure that loading form a directory, Fastlib, or reloading from either all behave the same way, which they did not previously.