On Jan 3, 2008, at 10:32 PM, Brian Mitchell wrote: > Not perfect (I really don't like using class_eval + undef_method like > that), but it does work and it does avoid making a complete mess of > the namespace with __ methods. Maybe an alternative that Ruby 1.9 > could provide would be a few useful methods like instance_eval > available as unbound methods via the class: > > # No need to force Object instance methods to work on BasicObject > # if there are a few special cases made via the class. > BasicObject.unbound_instance_eval.bind(foo).call {@secret} Or even have a BasicObject method, which by default just reurns a BasicObject class. Then define + on it, which then binds those unbound methods into a singleton instance, so you could write class Foo < BasicObject + :instance_eval ... end Dave