Skip to content

Commit 8a87ebf

Browse files
committed
Merge pull request rails#18576 from yui-knk/fix/autoload4
[ci skip] Move a introduction of `Module.nesting`
2 parents f3184a9 + 75b3823 commit 8a87ebf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

guides/source/autoloading_and_reloading_constants.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ end
8080
```
8181

8282
The *nesting* at any given place is the collection of enclosing nested class and
83-
module objects outwards. For example, in the previous example, the nesting at
83+
module objects outwards. The nesting at any given place can be inspected with
84+
`Module.nesting`. For example, in the previous example, the nesting at
8485
(1) is
8586

8687
```ruby
@@ -153,8 +154,6 @@ the blocks that may be passed to `Class.new` and `Module.new` do not get the
153154
class or module being defined pushed to their nesting. That's one of the
154155
differences between defining classes and modules in one way or another.
155156

156-
The nesting at any given place can be inspected with `Module.nesting`.
157-
158157
### Class and Module Definitions are Constant Assignments
159158

160159
Let's suppose the following snippet creates a class (rather than reopening it):

0 commit comments

Comments
 (0)