aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--guides/source/constant_autoloading_and_reloading.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/guides/source/constant_autoloading_and_reloading.md b/guides/source/constant_autoloading_and_reloading.md
index e2c0d7003d..a426fd75b3 100644
--- a/guides/source/constant_autoloading_and_reloading.md
+++ b/guides/source/constant_autoloading_and_reloading.md
@@ -141,13 +141,16 @@ executed, and popped after it.
* The module object following a `module` keyword gets pushed when its body is
executed, and popped after it.
-* When a singleton class is opened with `class << object`, said singleton class
-gets pushed when the body is executed, and popped after it.
+* A singleton class opened with `class << object` gets pushed, and popped later.
* When any of the `*_eval` family of methods is called using a string argument,
the singleton class of the receiver is pushed to the nesting of the eval'ed
code.
+* The nesting at the top-level of code interpreted by `Kernel#load` is empty
+unless the `load` call receives a true value as second argument, in which case
+a newly created anonymous module is pushed by Ruby.
+
It is interesting to observe that blocks do not modify the stack. In particular
the blocks that may be passed to `Class.new` and `Module.new` do not get the
class or module being defined pushed to their nesting. That's one of the