#2766: remove code without effect.
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 9fae81e..c5b0f4e 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -2268,8 +2268,6 @@
 
     module = _normalize_module(module)
     tests = test_finder.find(module, globs=globs, extraglobs=extraglobs)
-    if globs is None:
-        globs = module.__dict__
     if not tests:
         # Why do we want to do this? Because it reveals a bug that might
         # otherwise be hidden.