internal void SetConstantNoMutateNoLock(string/*!*/ name, object value) { Context.RequiresClassHierarchyLock(); InitializeConstantsNoLock(); _context.ConstantAccessVersion++; _constants[name] = new ConstantStorage(value); }
// thread-safe: public static void SetBuiltinConstant(RubyModule /*!*/ module, string /*!*/ name, object value) { // TODO: hoist the lock? using (module.Context.ClassHierarchyLocker()) { module.SetConstantNoMutateNoLock(name, value); } }