From: Hagbard Celine Date: 2010-06-14T03:33:40+09:00 Subject: Loading a module without polluting my namespace Hey folks! In my current project I try to load a module dynamically. Which is basically no problem due to 'require` accepting filenames as well. My problem is that I'd totally pollute my namespace. I thought of something like the following: def load_module(filename) module NamespaceGuard # Just a random name require filename # Take a care of the loaded module end # My namespace is clean again end But Ruby's syntax apparently forbids module definitions in methods. I'd be very glad if anyone could help me with this problem. -- Posted via http://www.ruby-forum.com/.