public void ForEachConstant(bool inherited, Func<RubyModule/*!*/, string/*!*/, object, bool>/*!*/ action) {
Context.RequiresClassHierarchyLock();
ForEachAncestor(inherited, delegate(RubyModule/*!*/ module) {
// notification that we entered the module (it could have no constant):
if (action(module, null, Missing.Value)) return true;
return module.EnumerateConstants(action);
});
}